Rapid-fire: Docker commands used in CI for build, tag, push and cleanup.
BeginnerProductionRapid-Fire Commands
Answer
docker build -t shop/api:$GIT_SHA .
docker tag shop/api:$GIT_SHA registry.example.com/shop/api:$GIT_SHA
echo "$TOKEN" | docker login registry.example.com -u ci --password-stdin
docker push registry.example.com/shop/api:$GIT_SHA
docker system prune -af --filter "until=72h"
More on Rapid-Fire Commands
Rapid-fire: how do you trigger a GitHub Actions workflow from the CLI and watch it?BeginnerRapid-fire: how do you list and manage GitHub secrets and variables via CLI?BeginnerRapid-fire: how do you validate a GitHub Actions workflow locally?BeginnerRapid-fire: how do you validate a `.gitlab-ci.yml` and trigger a pipeline from the CLI?BeginnerRapid-fire: how do you trigger a Jenkins job remotely with parameters?IntermediateRapid-fire: how do you validate a Declarative Jenkinsfile from the command line?Intermediate