Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
# ----- build image -----
FROM node:14.15.0-alpine AS build-env
WORKDIR /app
COPY . /app
RUN yarn install
RUN yarn build
RUN mkdir tmp \
&& cp -r build \
package.json \
tsconfig.json \
yarn.lock \
node_modules \
tmp
# ----- final image -----
FROM node:14.15.0-alpine
WORKDIR /app
LABEL maintainer="Tommy Alexandre <tommy.alexandre@thetribe.io>"
COPY --from=build-env /app/tmp /app
EXPOSE 8080
USER node
ENTRYPOINT [ "yarn" ]
CMD [ "start" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment