Skip to content

Instantly share code, notes, and snippets.

@bbachi
Created September 6, 2019 05:56
Show Gist options
  • Save bbachi/3b7ab4b263db9a3a4dbdecde6c3e944a to your computer and use it in GitHub Desktop.
Save bbachi/3b7ab4b263db9a3a4dbdecde6c3e944a to your computer and use it in GitHub Desktop.
docker env
# 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