Docker Practice Static Web
Docker Practice Static Web
Create Directory Include
Dockerfile
Nginx File
Edit Dockerfile
docker build -t static .
FROM ubuntu:16.04 MAINTAINER Robin "xlcoder166@gmail.com" RUN apt-get -y update && apt-get -y install nginx RUN mkdir -p /var/www/html/website ADD nginx/nginx.conf /etc/nginx/nginx.conf ADD nginx/default /etc/nginx/sites-available/ EXPOSE 80
Edit Nginx File
daemon off
enable docker
docker run -d -p 80 -v /var/www/website:/var/www/html/website static nginx