Questions tagged [docker-buildkit]
52 questions
2
votes
0 answers
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…
![](../../users/profiles/1489984.webp)
Yacine Nouri
- 31
- 4
2
votes
0 answers
How do we run from an intermediary layer with docker buildkit?
With non buildkit mode, when we build, we have this sort of output:
...
Step 38/43 : COPY tests .
---> d201e365ba86
Step 39/43 : COPY tools .
---> 13d191aa76c1
Step 40/43 : COPY tox.ini .
---> 4173ecd8eae9
...
If it fails somewhere, we can…
![](../../users/profiles/704265.webp)
Finch_Powers
- 2,458
- 1
- 24
- 32
2
votes
0 answers
Organizing overlay2 docker layers manually after parallel buildkit build
I am using docker with buildkit and multi-stage builds to create a number of conda environments in parallel then copying them into my final stage. Many of the layers have large complex dependencies and copying each of the environments into the final…
![](../../users/profiles/277936.webp)
Christopher
- 63
- 6
2
votes
0 answers
Docker caching with ADD wildcard
I'm not sure about this but I've noticed that the docker layer cache breaks when copying files with wildcards, see the following build context :
The issue is that, when modifying the Kernel.php (add a space, anything..) and run docker build again,…
![](../../users/profiles/379105.webp)
kitensei
- 2,370
- 1
- 33
- 63
2
votes
1 answer
How do I reuse the cache from a `RUN --mount=type=cache` docker build?
I'm using the new experimental docker buildkit syntax to do a multistage build, as so:
Dockerfile:
RUN --mount=type=cache,target=/home/build/.build-cache,gid=1000,uid=1001 ./build
bash:
DOCKER_BUILDKIT=1 docker build .
Works great locally. On CI I…
![](../../users/profiles/1423361.webp)
Robert Elliot
- 905
- 9
- 15
2
votes
1 answer
Docker run --mount make all files available in a different folder during RUN
I want to make a folder on my host machine available during a RUN statement. That is, similar to the effect of a container run with -v:
docker run -v /path/on/host:/path/in/container mycontainer:tag
In the container this gives me /path/in/container…
![](../../users/profiles/3286743.webp)
robertdj
- 371
- 2
- 9
2
votes
0 answers
Using docker buildkit caching with R-packages
I'm trying to use the docker buildkit approach to caching packages to speed up adding packages to docker containers. I learned about it from the instructions for both python and apt-get packages and useful Stackexchange answer on caching python…
![](../../users/profiles/4155453.webp)
jameshowison
- 113
- 7
2
votes
1 answer
Buildctl command to tag multiple images
I am using Buildkit to build and push the images. I would like to add multiple tags on the images in buildctl command. For eg
buildctl build --frontend=dockerfile.v0 --local context=. --local dockerfile=.…
![](../../users/profiles/10874564.webp)
PREETI BANSAL
- 95
- 1
- 8
1
vote
0 answers
Is not using --no-cache safe when building Docker image using BuildKit to pass secret
Is there any difference in terms of security of the secret between these 2 commands while building Docker image with Docker Buildkit (export DOCKER_BUILDKIT=1).
docker build --no-cache --progress=plain --secret id=mysecret,src=mysecret.txt .
With…
![](../../users/profiles/13548379.webp)
giraycoskun
- 120
- 6
1
vote
1 answer
Docker build failed to compute cache key
ITNOA
Hi,
I have below project structure
Mode LastWriteTime Length Name
---- ------------- ------ ---- …
![](../../users/profiles/1539100.webp)
sorosh_sabz
- 1,073
- 1
- 15
- 32
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 " …
![](../../users/profiles/1088790.webp)
haelix
- 3,405
- 3
- 26
- 44
1
vote
0 answers
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 …
![](../../users/profiles/11600614.webp)
Lukas1818
- 71
- 4
1
vote
1 answer
Is it possible to push docker images for different architectures separately?
From what I know docker buildx build --push will overwrite existing image architectures with the one you specified in --platform parameter. As I understand you have to build and push for all architectures at the same time when using buildx. However,…
![](../../users/profiles/1826109.webp)
chingis
- 763
- 5
- 18
1
vote
0 answers
Docker multi-stage build caching
IIUC, docker doesn't natively support caching multi-stage build layers in a repository. I had expected the results of the multi-stage build to be cached, but is that not the case?
For example, take a toy build file:
FROM centos:7 as stage_0
RUN…
![](../../users/profiles/3064736.webp)
Maximilian
- 4,783
- 1
- 31
- 38
1
vote
0 answers
Is docker --cache-from using local or remote registry?
I can't find any information regarding which registry (local or remote) is used when using the docker buildkit --cache-from feature.
Let's say I run this:
export DOCKER_BUILDKIT=1
docker build -t my-registry/my-image-name --build-arg…
![](../../users/profiles/5492785.webp)
Adrien Ball
- 281
- 2
- 11