Skip to content

Commit

Permalink
cicd docker repo public
Browse files Browse the repository at this point in the history
  • Loading branch information
tanquangduong committed Sep 18, 2024
1 parent f290dcf commit 7e7be08
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/cd-docker-ec2.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,9 @@ jobs:
# Log in to Docker
echo "${{ secrets.DOCKERHUB_TOKEN }}" | sudo docker login --username "${{ secrets.DOCKERHUB_USERNAME }}" --password-stdin
# Verify Docker login
sudo docker info
# Free up disk space
docker system prune -a -f
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,10 @@ Example use case of CI-CD: GitHub Action x Docker x EX2 AWS
- docker pull ${{ secrets.DOCKERHUB_USERNAME }}/mlops:latest
- Run Docker container, name it as 'mlops-container'
- docker run --name mlops-container -d -p 8501:8501 ${{ secrets.DOCKERHUB_USERNAME }}/mlops:latest
- docker run --name cicd_ec2-container -d -p 8501:8501 duongtanquang/cicd_ec2:latest
- docker run --name cicd-container -d -p 8501:8501 duongtanquang/cicd_ec2:latest
- Check Docker log
- docker logs cicd_ec2-container
- docker logs cicd-container
- Stop Docker container
- docker stop cicd_ec2-container || true
- docker stop cicd-container || true
- Remove Docker container
- docker rm cicd_ec2-container || true
- docker rm cicd-container || true

0 comments on commit 7e7be08

Please sign in to comment.