Created
May 18, 2019 08:40
-
-
Save keidrun/10df5ae05c10c30e9b9593e7a9b94ccf to your computer and use it in GitHub Desktop.
How to add tini to a dockerized NodeJS app
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
FROM node:12.2-alpine | |
ENV NODE_ENV=production | |
RUN apk add --no-cache tini | |
WORKDIR /node | |
COPY package.json yarn.lock ./ | |
RUN mkdir app && chown -R node:node . | |
USER node | |
RUN yarn install && yarn cache clean --force | |
WORKDIR /node/app | |
COPY --chown=node:node . . | |
EXPOSE 3000 | |
ENTRYPOINT ["/sbin/tini", "-e", "143", "--"] | |
CMD ["node", "app.js"] |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment