Skip to content

Instantly share code, notes, and snippets.

@gabrielfreirebraz
Last active March 30, 2024 00:04
Show Gist options
  • Save gabrielfreirebraz/ad62b5077f4b1a4875c2b78987209e2f to your computer and use it in GitHub Desktop.
Save gabrielfreirebraz/ad62b5077f4b1a4875c2b78987209e2f to your computer and use it in GitHub Desktop.
Dockerfile example to get start a new api rest
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