Created
May 29, 2021 10:41
-
-
Save TommyTheTribe/b90586b8a74b1e8eddb9564d2083d705 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# ----- 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