Docker Integration & Docker Deployment
CICD with Docker via SSH
- SSH Key to access remote instance
- Remote Host IP (or EC2 DNS info)
- Remote Username
- Configure SSH login to remote instance
- Pull in the latest repo changes
- Stop existing docker containers
- Remove altered/deleted images
- Build/rebuild new/updated images
- Build new containers
- Clean up
- Remote Instance with ability to pull repository
- Repo will need to be cloned first
- Docker running on instance
- Git installed on instance
- Dockerfile must be in project's root folder
- This is designed to use the GitHub provided runner
- If you prefer a self-hosted runner, move the ssh config info to the runner's host
- Images are tagged with the project folder's name
- If the Dockerfile is removed, the associated image will be removed
- Included a workflow to manually re-deploy all running containers