ruk·si

🐳 Dockerfile
Node.js

Updated at 2015-01-17 10:04
mkdir image-name
cd image-name
touch Dockerfile
FROM ubuntu:14.04
RUN apt-get update --fix-missing && \
    apt-get install -y --no-install-recommends \
        nodejs \
        && \
    apt-get clean && \
    apt-get autoremove && \
    rm -rf /var/lib/apt/lists/*
WORKDIR /var/www
COPY ./package.json ./package.json
RUN npm install
COPY ./app.js ./app.js
CMD node ./app.js
# In the directory with the Dockerfile, build and name the container.
docker build -t owner/image-name:version-name .
docker run -p 80:80 owner/image-name:version-name