Last active
March 30, 2024 00:04
-
-
Save gabrielfreirebraz/ad62b5077f4b1a4875c2b78987209e2f to your computer and use it in GitHub Desktop.
Dockerfile example to get start a new api rest
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:18.16.1-alpine | |
WORKDIR /api | |
COPY package.json . | |
RUN yarn install | |
COPY . . | |
RUN yarn build | |
RUN rm -rf node_modules | |
RUN yarn install --production | |
EXPOSE 4000 | |
CMD ["yarn", "start"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment