mhart / alpine-node

Minimal Node.js Docker Images built on Alpine Linux

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fatal process OOM in Failed to reserve virtual memory for CodeRange (mhart/alpine-node:16)

arman-mukatov opened this issue · comments

Getting an error while building. MacOS AppleSilicon

Fatal process OOM in Failed to reserve virtual memory for CodeRange
uncaught target signal 5 (Trace/breakpoint trap) - core dumped

FROM mhart/alpine-node:16
RUN apk update && \
  apk add --no-cache \
    sudo \
    g++ \
    gcc \
    git \
    libev-dev \
    libevent-dev \
    libuv-dev \
    make \
    openssl-dev \
    perl \
    python3
ARG uid=1000
ARG user=appuser
RUN set -x ; \
  addgroup -g $uid -S $user ; \
  adduser -u $uid -D -S -G $user $user \
  && exit 0 ; exit 1
RUN echo $user' ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN yarn global add node-gyp
RUN git clone --recursive https://github.com/sass/node-sass.git \
  && cd node-sass \
  && yarn \
  && node scripts/build -f
RUN mkdir /project
WORKDIR /project
COPY . .
RUN chown -Rh $user:$user /project
USER $user
RUN yarn`
```

This is an issue with docker for mac not this repo docker/for-mac#5831