Created
September 6, 2019 05:56
-
-
Save bbachi/3b7ab4b263db9a3a4dbdecde6c3e944a to your computer and use it in GitHub Desktop.
docker env
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
# base image | |
ARG TAG=slim | |
FROM node:$TAG | |
ARG PORT_ARG=3080 | |
# setting the work direcotry | |
WORKDIR /usr/src/app | |
ENV PORT=$PORT_ARG | |
# copy package.json | |
COPY ./package.json . | |
# install dependencies | |
RUN npm install | |
# COPY index.js | |
COPY ./index.js . | |
EXPOSE 3080 | |
RUN node -v | |
CMD ["node","index.js"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment