# 创建镜像 ``` docker build -t dzj_web . ``` # 创建上线镜像 ``` docker build --build-arg ONLINE=yes -t dzj_web . ``` # 上传镜像 ``` docker tag dzj_web:latest lq.ailishi.org:5001/dzj_web:1.0 docker push lq.ailishi.org:5001/dzj_web:1.0 ``` # 下载镜像 ``` docker pull lq.ailishi.org:5001/dzj_web:1.0 ``` # 创建并允许容器 host模式 ``` docker run --restart=always --network=host --name web -d dzj_web docker stop web docker rm web docker run --restart=always --network=host --name web -d lq.ailishi.org:5001/dzj_web:1.0 ``` # 进入容器 ``` docker exec -it dzj_web /bin/bash ```