ruk·si

🐳 Dockerfile
nginx

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 \
        nginx \
        && \
    apt-get clean && \
    apt-get autoremove && \
    rm -rf /var/lib/apt/lists/*
RUN echo "daemon off;" > /etc/nginx/nginx.conf
COPY index.html /user/share/nginx/html/index.html
EXPOSE 80
ENTRYPOINT /usr/sbin/nginx
# In the directory with the Dockerfile, build and name the image.
docker build -t your-name/image-name:version .
docker run -p 80:80 your-name/image-name:version
FROM ubuntu:14.04

RUN rm /etc/nginx/sites-enabled/default
RUN mkdir -p /var/www

COPY ./ /var/www/journal
COPY config/nginx-site.conf /etc/nginx/sites-enabled/journal
COPY config/start-server.sh /usr/bin/start-server

RUN cmmod +x /usr/bin/start-server
RUN mkdir -p /var/log/journal

EXPOSE 80
ENTRYPOINT /usr/bin/start-server