Questions tagged [docker-buildkit]

142 questions
1
vote
0 answers

AWS Codebuild is only using cached Docker layers when no changes are done

I am building a Docker image with AWS Codebuild. I recently added buildkit to make use of the build cache (before this, there was no cache utilized at all). The build command from my buildspec file is this: DOCKER_BUILDKIT=1 docker build --build-arg…
rablentain
  • 6,641
  • 13
  • 50
  • 91
1
vote
0 answers

Docker BuildKit build with tmpfs mount fails the 2nd time around

This works: # note: cache .cache/go-build across docker builds RUN --mount=type=tmpfs,target=/home/myuser/.cache \ pacman -S --needed --noconfirm go && \ su - myuser -c " …
haelix
  • 4,245
  • 4
  • 34
  • 56
1
vote
1 answer

buildx fail building multiplatform docker image, becuase it try to copy xattrs (Extended file attributes) and fail doing this

I use buildx to build multiplatform docker image in the gitlab-ci. But the ci fail while building docker image, because it try to copy xattrs and fail to do this: > [linux/arm/v7 2/4] RUN set -xe && apk add --no-cache ca-certificates …
1
vote
1 answer

How do you extract/reuse Docker BuildKit caches with CI

Docker introduces RUN --mount=type=cache which I can work well locally, but I want to be able to leverage it in a CI specifically Azure Devops. But I can't find a way of save and load the cache between builds. Is there an option to do this?
1
vote
1 answer

Docker build with buildkit and mirror.gcr.io fails on uncached images

When building a Dockerfile which refers to an image which is not cached on mirror.gcr.io, and when enabled with DOCKER_BUILDKIT=1; the build fails: $ cat Dockerfile.test FROM debian:10 $ sudo cat /etc/docker/daemon.json { …
hbogert
  • 4,198
  • 5
  • 24
  • 38
1
vote
1 answer

Docker buildx on Travis CI

I'm trying to build image for platform ppc64le via Docker Buildx and Buildkit on our enterprise Travis CI instance. .travis.yml: os: linux dist: bionic language: shell branches: only: - master before_install: - set -e # Configure…
mflame
  • 137
  • 1
  • 2
  • 9
1
vote
2 answers

push cache to insecure registry by buildx

How to push cache to an insecure registry? I have already added it to my docker config and can log in successfully by docker login. This is my docker command: docker buildx build --cache-to=type=registry,ref=my-insecure-repo/lib/test:0730 \ …
FakeAlcohol
  • 860
  • 7
  • 28
1
vote
0 answers

How to add support for mips to my docker buildx builder?

I have created a buildx builder but it's missing mipsel support. I assumed it should support all archs qemu supports as well. $ docker buildx create --name mybuilder mybuilder $ docker buildx use mybuilder $ docker buildx inspect --bootstrap [+]…
Paulo Matos
  • 1,614
  • 17
  • 23
0
votes
1 answer

Docker compose build time secrets are missing

I want to use a secret duting the build stage of my service. However I can't seem to find the secret, or any evidence that it exists during the build stage. I've tried this simple example docker-compose.yml services: frontend: build: …
TBlackmore
  • 53
  • 5
0
votes
1 answer

Dockerfile `RUN --mount=type=ssh` does'nt work with ssh repository dependancies inside package.json / package-lock.json

I tried to build a nodejs application with ssh external dependancies with and without package-lock.json in a Dockerfile. It seems that --mount=type=ssh doesn't works recursively when cloning external ssh dependancies with npm package-lock.json…
0
votes
0 answers

'npm ERR! signal SIGTERM' with DOCKER_BUILDKIT=1 in gitlab docker runner

My gitlab docker runner is based on image docker:20-dind. When I use Buildkit (by setting DOCKER_BUILDKIT: 1 as variable in the gitlab-ci.yml) the build fails with #25 [be-spaces 3/4] RUN npm run build:be-spaces #25…
andymel
  • 4,538
  • 2
  • 23
  • 35
0
votes
0 answers

How to view image when buildkit is on?

Say I have a very basic Dockerfile: FROM busybox RUN something Also, say my local registry is empty. If I run docker build, after build is done, I show be able to view busybox image by docker images, and inspect the image by docker inspect…
TieDad
  • 9,143
  • 5
  • 32
  • 58
0
votes
0 answers

How are you supposed to use from in RUN --mount=type=cache,from=foo

From https://docs.docker.com/engine/reference/builder/#run---mounttypecache Is from supposed to be used with multi stage builds? What is an example use case? Examples would be useful. All examples I've seen are for a single target
Novaterata
  • 4,356
  • 3
  • 29
  • 51
0
votes
0 answers

Docker legacy builder and BuildKit behaves differently regarding volumes

I've made two observations about volumes in the past when it came to change the data within a declared volume (respectively directory) from within the Dockerfile. You cannot change the owner and group of such a directory (see also…
Arber
  • 421
  • 1
  • 3
  • 13
0
votes
0 answers

Can I configure docker buildx build to use the --load option by default?

I have a bunch of shell scripts that run docker build to build Docker images, something like #!/bin/bash docker build -t my.registry/image1:latest dir1 docker build -t my.registry/image2:latest dir2 ... These images need to run on a linux/amd64…
Paul Li
  • 3
  • 1