I have a very simple Buildkite pipeline using the docker-compose plugin as follows:
steps:
- label: ":docker: Push to :ecr: repository"
plugins:
- docker-compose#v4.14.0:
push:
- app:123456789012.dkr.ecr.ap-southeast-2.amazonaws.com/my-server:latest
agents:
queue: build
with a docker-compose
file as follows:
version: '3.7'
services:
app:
build:
context: .
As per the documentation (GitHub - buildkite-plugins/docker-compose-buildkite-plugin: 🐳⚡️ Run build scripts, and build + push images, w/ Docker Compose) I’d expect this to build my app
service image and push it to my ECR repository. However, it fails as follows:
:docker: Building app
$ docker-compose -f docker-compose.yml -p buildkite018ae08d68e240deadb0d5fa55338b59 build app
...
:docker: Pushing image 123456789012.dkr.ecr.ap-southeast-2.amazonaws.com/my-server:latest
$ docker tag buildkite018ae08d68e240deadb0d5fa55338b59_app 123456789012.dkr.ecr.ap-southeast-2.amazonaws.com/my-server:latest
Error response from daemon: No such image: buildkite018ae08d68e240deadb0d5fa55338b59_app:latest
🚨 Error: The command exited with status 1
As can be seen the image is being built minus the _app
suffix buildkite018ae08d68e240deadb0d5fa55338b59
but the push attempt is trying to push buildkite018ae08d68e240deadb0d5fa55338b59_app
.
What am I missing here?