Hi,
We're currently using docker-compose to layout our microservice architecture.
Our CI/CD server just executes a docker-compose build and a docker-compose push to build and push the images within a docker-in-docker environment. I'd like to switch that to kaniko, but I don't like to specifiy each Dockerfile individually.
I know that google is not using docker compose but it would be great if kaniko would be able to read (and merge) docker-compose files and use the build informations contained in there to build and push multiple images at once.
Something like:
version: '3'
services:
api:
image: registry:3000/api
build:
context: .
dockerfile: ./src/api/Dockerfile
frontend:
image: registry:3000/frontend
build:
context: .
dockerfile: ./src/frontend/Dockerfile
docker run -v .:/workspace gcr.io/kaniko-project/executor:latest --compose ./docker-compose.yml --compose ./docker-compose.override.yml -c /workspace/
We're in the same boat. We have a single docker-compose.yaml that defines our build and pushes tagged images. It also fires up the stack for local development. Very neat, because there's a single source of truth, and we run the same docker-compose build in GCB. Simple and repeatable.
The only downside is that we can't use the kaniko cache, and there's a lot of wasted resources.
The alternative is to configure each image build individually in cloudbuild.yaml, but then we lose the single source of truth.
Most helpful comment
We're in the same boat. We have a single
docker-compose.yamlthat defines our build and pushes tagged images. It also fires up the stack for local development. Very neat, because there's a single source of truth, and we run the same docker-compose build in GCB. Simple and repeatable.The only downside is that we can't use the kaniko cache, and there's a lot of wasted resources.
The alternative is to configure each image build individually in cloudbuild.yaml, but then we lose the single source of truth.