-
-
Save sahanasj/a6120645e8eb0319182e79859a78b22f to your computer and use it in GitHub Desktop.
DockerFile to Create Application FrontEnd Image
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
FROM node:7.7-alpine | |
# install dependencies | |
ADD package.json /tmp/package.json | |
RUN cd /tmp && npm install | |
# Copy dependencies | |
RUN mkdir -p /opt/to-do-app && cp -a /tmp/node_modules /opt/to-do-app | |
# Setup workdir | |
WORKDIR /opt/to-do-app | |
RUN mkdir /opt/to-do-app/dist | |
COPY dist /opt/to-do-app/dist | |
COPY server.js /opt/to-do-app | |
COPY initialize.js /opt/to-do-app | |
# run | |
EXPOSE 8080 | |
CMD ["sh", "-c", "node initialize && node server"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment