diff --git a/.trustie-pipeline.yml b/.trustie-pipeline.yml index 2f19d65..c0c2b41 100644 --- a/.trustie-pipeline.yml +++ b/.trustie-pipeline.yml @@ -12,6 +12,7 @@ steps: # host、username、password可在参数管理中配置 - name: 远程主机部署 image: appleboy/drone-ssh + pull: if-not-exists # 添加此行,只在本地没有镜像时才拉取 settings: host: from_secret: deploy_ip @@ -27,5 +28,6 @@ steps: - chmod 777 /opt/test - docker rm -f nginx - echo ====开始部署======= - - docker run -d -p 58080:80 -v /opt/test:/usr/share/nginx/html:ro --name nginx nginx - - echo ====部署成功====== \ No newline at end of file + - docker run -d -p 58080:80 -v /opt/test:/usr/share/nginx/html:ro --name nginx nginx:1.24.0 + - echo ====部署成功====== + \ No newline at end of file