Skip to content

Instantly share code, notes, and snippets.

@m4nu56

m4nu56/Dockerfile

Created Nov 11, 2019
Embed
What would you like to do?
FROM node:10
ENV TZ=Europe/Paris
RUN ln -snf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone
RUN apt-get update && apt-get install -y build-essential && apt-get install -y python
# Create app directory
WORKDIR /usr/src/app
# Install app dependencies
# A wildcard is used to ensure both package.json AND package-lock.json are copied
# where available (npm@5+)
COPY package*.json /usr/src/app/
RUN npm install
# Bundle app source
COPY ./src/ /usr/src/app/
# Copy jest configuration so we can execute tests on the container
COPY jest.config.js /usr/src/app/jest.config.js
# Copy config .env file
COPY ./.env_docker /usr/src/app/.env
EXPOSE 3000
CMD [ "node", "server.js" ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment