johnsonzhan121/example_app` `docker build docker/nginx/. -t johnsonzhan121/example_nginx` p '本地 Docker Image 上傳 Docker Hub' `docker push johnsonzhan121/example_app` `docker push johnsonzhan121/example_nginx` p '本地上傳 docker-compose.yml 到 VPS' `scp docker-compose.yml
[email protected]:/home/example_app` p 'VPS 從 Docker Hub 下載 Docker Image' `ssh
[email protected] 'docker pull johnsonzhan121/example_app’` `ssh
[email protected] 'docker pull johnsonzhan121/example_nginx'` p '在 VPS 啟動 docker-compose.yml' `ssh
[email protected] 'cd /home/example_app && docker-compose up'` 更新自動化程式