Skip to content

Instantly share code, notes, and snippets.

@oneteamai
Last active July 21, 2020 21:55
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oneteamai/15a50a1ecc1f1ce6ddbcc0732c66ec86 to your computer and use it in GitHub Desktop.
Save oneteamai/15a50a1ecc1f1ce6ddbcc0732c66ec86 to your computer and use it in GitHub Desktop.
700MB image that uses shm-size option
# base image
FROM node:13.10.1-alpine
# set working directory
WORKDIR /app
COPY . .
# add `/app/node_modules/.bin` to $PATH
ENV PATH /app/node_modules/.bin:$PATH
# install
COPY package.json /app/package.json
RUN apk add yarn
RUN YARN_CACHE_FOLDER=/dev/shm/yarn_cache yarn install --production
RUN yarn build
RUN yarn global add serve
# start app
CMD serve -s build -l 3000
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment