Skip to content

Latest commit

 

History

History
43 lines (28 loc) · 1.05 KB

File metadata and controls

43 lines (28 loc) · 1.05 KB

Node.js Docker Image

Docker Repository on Quay

How to use this image

Create a Dockerfile in your Node.js app project

# specify the node base image with your desired version node:<version>
FROM quay.io/interactar/nodejs:8.x

FROM quay.io/interactar/nodejs:latest                                                                                                                                           
LABEL maintainer "John Doe" <mail@example.com>

ENV destDir /src/app

# Create app directory
RUN mkdir -p ${destDir}

#Set working Directory
WORKDIR ${destDir}

# Install app dependencies
COPY package.json .
RUN npm install --loglevel verbose

# Copy app source
COPY . .

# replace this with your application's default port
EXPOSE 3000

CMD [ "npm", "start" ]

You can then build and run the Docker image:

$ docker build -t my-nodejs-app .
$ docker run -it --rm --name my-running-app my-nodejs-app