Skip to content

Instantly share code, notes, and snippets.

@cuongtransc
Created January 29, 2019 02:22
Show Gist options
  • Save cuongtransc/2a144a6dfbfc7c0ba2fefbd8a8a3c3e6 to your computer and use it in GitHub Desktop.
Save cuongtransc/2a144a6dfbfc7c0ba2fefbd8a8a3c3e6 to your computer and use it in GitHub Desktop.
#--------------------------------------
# Stage: Compile Apps
#--------------------------------------
FROM node:8.9
LABEL maintainer="[email protected]"
ENV REFRESHED_AT 2018-02-26
WORKDIR /app
COPY yarn.lock /app/yarn.lock
COPY package.json /app/package.json
RUN yarn install
COPY . /app/
ARG REACT_APP_ENV=development
RUN yarn run build
#--------------------------------------
# Stage: Packaging Apps
#--------------------------------------
FROM nginx:1.13-alpine
VOLUME /app
COPY --from=0 /app/build /app
EXPOSE 80
COPY docker-entrypoint.sh /
CMD ["/docker-entrypoint.sh"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment