Docker-Nginx,发布前端服务

1、安装环境:

yum install -y yum-utils \
device-mapper-persistent-data \
lvm2

yum-config-manager \
--add-repo \
https://download.docker.com/linux/centos/docker-ce.repo

yum install docker-ce docker-ce-cli containerd.io

systemctl start docker

docker pull nginx:latest

docker run -p 80:80 -d nginx

2、发布前端服务:

cd ./room-screenpage-ui-13342
docker build -t room-screenpage-ui-13342 .
docker run -d --name room-screenpage-ui-13342 -p 13342:80 room-screenpage-ui-13342

停用容器: docker stop nginx, 
再次启动: docker start nginx, 
删除已注册的容器: docker rm nginx

你可能感兴趣的:(Docker-Nginx,发布前端服务)