Questions tagged [kaniko]

kaniko is a tool to build container images from a Dockerfile, inside a container or Kubernetes cluster.

kaniko is a tool to build container images from a Dockerfile, inside a container or Kubernetes cluster.

118 questions
34
votes
1 answer

How to perform kaniko Docker build and push in separate GitLab CI stages?

I have a Dockerfile which I can build using kaniko in the GitLab CI/CD pipeline. Currently the build stage both builds the Container and pushes it to the remote Docker repository. I would like to utilize the stages concept of the CI/CD pipeline to…
kmindi
  • 4,524
  • 4
  • 31
  • 47
14
votes
1 answer

What is the difference between Kaniko and BuildKit/Buildx?

From what I understand: They are both tools to build container images The build itself runs in a container The build can happen on a remote node, for example in a Kubernetes cluster (Kaniko, BuildKit) They both offer advanced features such as layer…
Yacine Nouri
  • 184
  • 1
  • 10
7
votes
2 answers

How to Use Docker Build Secrets with Kaniko

Context Our current build system builds docker images inside of a docker container (Docker in Docker). Many of our docker builds need credentials to be able to pull from private artifact repositories. We've handled this with docker secrets..…
7
votes
1 answer

how to run test against the built image before pushing to container's registry?

From the gitlab documentation this is how to create a docker image using kaniko: build: stage: build image: name: gcr.io/kaniko-project/executor:debug entrypoint: [""] script: - mkdir -p /kaniko/.docker - echo…
LearningNoob
  • 662
  • 6
  • 23
7
votes
2 answers

SpringBoot's bootBuildImage with Kaniko instead of a Docker daemon

SpringBoot 2.3 introduced a feature to create OCI/Docker images by running ./gradlew bootBuildImage instead of having a Dockerfile and execute docker build . When building on a Gitlab build server that is running inside a Kubernetes cluster there is…
lathspell
  • 3,040
  • 1
  • 30
  • 49
6
votes
4 answers

Possible to add kaniko to alpine image or add jq to kaniko image

This is how I'm using kaniko to build docker images in my gitlab CI, which is working great. But I need to read a json file to get some values. Therefore I need to get access to jq. .gilab-ci.yml deploy: stage: deployment image: name:…
user3142695
  • 15,844
  • 47
  • 176
  • 332
6
votes
2 answers

Google Cloud Build with kaniko cache fails

I'm using Google Cloud Build along with kaniko cache for speedup. Until recently if worked perfectly, but now it's failing with ERROR: build step 2 "gcr.io/kaniko-project/executor:latest" failed: step exited with non-zero status: 137 I assume, it's…
6
votes
1 answer

Gitlab CI: Execute own Script in Kaniko Job

I have the following Job to build Images in my gitlab-ci.yml dockerize: stage: containerize before_script: - eval $($CONTEXT_SCRIPT_PATH) environment: name: $CONTEXT url: XXX image: name:…
5
votes
1 answer

How to use Kaniko in cloudbuild.yaml?

I just learned that one can speed up the build process in Google Cloud build by using Kaniko cache. I looked at the docs and it provided a small example. However, I'm not sure how to apply it in my use case. I am basically pushing a Nuxt app into my…
5
votes
2 answers

How can I use a non-exec entrypoint for Kaniko in Google Cloud Build (to enable build arg definition)

The instructions for using Kaniko in GCB use the exec form of the kaniko project builder, like this: - id: 'Build (with Kaniko Cache)' name: 'gcr.io/kaniko-project/executor:latest' args: -…
thclark
  • 4,784
  • 3
  • 39
  • 65
5
votes
1 answer

Share Kaniko Cache for Multi Stage Docker Builds with CloudBuild

I am working on a CloudBuild script that builds a multistage Docker image for integration testing. To optimize the build script I opted to use Kaniko. The relevant portions of the Dockerfile and cloudbuild.yaml files are available…
Paulo C
  • 374
  • 1
  • 5
  • 11
4
votes
1 answer

How to use Kaniko inside Gitlab CICD?

I am trying to use Kaniko with Gitlab in order to get rid of the DinD flow. So, I have this in my .gitlab-ci.yaml kaniko: stage: tagging variables: CI_REGISTRY: ${AZURE_REGISTRY_USERNAME_DEV}.azurecr.io CI_REGISTRY_USER:…
Kostas Demiris
  • 3,415
  • 8
  • 47
  • 85
4
votes
2 answers

Buildah vs Kaniko

I'm using ArgoWorkflow to automate our CI/CD chains. In order to build images, and push them to our private registry we are faced between the choice of either buildah or kaniko. But I can't put my finger on the main difference between the two. Pros…
Zehouani Alae
  • 61
  • 1
  • 5
4
votes
0 answers

What could be causing my "error checking push permissions" error on GitLab CI using Kaniko?

I am running dockerized GitLab CI 13.8.3, and recently I have been getting a new error when trying to build and push a docker image (via Kaniko) to my registry. The pipeline has been working for months now for this project, and I have not changed my…
Dan Largo
  • 1,075
  • 3
  • 11
  • 25
4
votes
0 answers

Container built in Kaniko has bad directory permissions, but works when built in Docker Desktop

I created a Dockerfile to run a simple Vue.js SPA using lighttpd as the webserver. Dockerfile FROM node:fermium-alpine AS builder RUN apk update && \ apk add --no-cache \ git && \ rm -rf /var/cache/apk/* WORKDIR /app COPY…
Moshe Katz
  • 15,992
  • 7
  • 69
  • 116
1
2 3 4 5 6 7 8