Created
August 11, 2021 17:04
-
-
Save jprivillaso/18a6d7eb3dd80c5ce449fd17babca821 to your computer and use it in GitHub Desktop.
Node/TS API Dockerfile
This file contains hidden or 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:14-alpine | |
# update packages | |
RUN apk update | |
# create root application folder | |
WORKDIR /app | |
# copy configs to /app folder | |
COPY package*.json ./ | |
COPY config /app/config | |
COPY tsconfig.json ./ | |
# copy source code to /app/src folder | |
COPY src /app/src | |
# check files list | |
RUN ls -a | |
RUN npm install | |
RUN npm run build | |
EXPOSE 3333 | |
CMD [ "node", "./dist/index.js" ] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment