Kaniko: docker-compose support

Created on 24 Aug 2018  路  1Comment  路  Source: GoogleContainerTools/kaniko

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/
aredockerfile-command help wanted kinfeature-request prioritp1

Most helpful comment

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.

>All comments

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.

Was this page helpful?
0 / 5 - 0 ratings

Related issues

tejal29 picture tejal29  路  4Comments

WoodProgrammer picture WoodProgrammer  路  5Comments

den-is picture den-is  路  3Comments

ErikWegner picture ErikWegner  路  4Comments

nartamonov picture nartamonov  路  4Comments