安裝Nginx
執行gitbook Container
docker run -d -e "container=docker" --privileged=true -v /sys/fs/cgroup:/sys/fs/cgroup --name gitbook -it -p 10080:80 -p 10081:81 -p 14000:4000 gitbook /usr/sbin/init
docker exec -it gitbook bash
安裝Nginx
yum install epel-release
rpm -Uvh http://nginx.org/packages/centos/7/noarch/RPMS/nginx-release-centos-7-0.el7.ngx.noarch.rpm
yum install nginx
systemctl enable nginx
systemctl start nginx
如果以上指令打完,應該可以在http://localhost:10080 看到nginx執行成功畫面
製作現階段的Docker Image
docker stop gitbook
docker commit gitbook nginx_gitbook
docker remove gitbook