← all drills

Build, tag and push an image

good deploy

A reproducible image build with a commit-sha tag and a floating env tag.

mode
docker · good deploy · difficulty 2
export SHA=$(git rev-parse --short HEAD) 
deploy@build-01:~$docker build --pull -t registry.example.com/api:sha-$SHA .
deploy@build-01:~$docker tag registry.example.com/api:sha-$SHA registry.example.com/api:staging

Enter submits a line · Tab then Enter restarts · Esc releases focus

Playing as a guest. Runs are saved against a device-local id — sign in with GitHub to keep your history and appear on the leaderboards.