Questions tagged [docker-buildkit]
52 questions
47
votes
2 answers
When using BuildKit with Docker, how do I see the output of RUN commands?
When building Docker images with DOCKER_BUILDKIT=1, there is a very cool progress indicator but no command output. How do I see the command output to debug my build?
![](../../users/profiles/36330.webp)
joeforker
- 36,731
- 34
- 138
- 231
35
votes
2 answers
How do you enable BuildKit with docker-compose?
I tried export DOCKER_BUILDKIT=1 before a docker-compose build command and I did not see the expected BuildKit output. What did I miss?
![](../../users/profiles/242042.webp)
Archimedes Trajano
- 22,850
- 10
- 113
- 154
13
votes
2 answers
Using Docker Buildkit on Google Cloud Build
I'm trying to use BuildKit with Docker on Google Cloud Build so that I can eventually use the --secret flag. I'm using Build Enhancements for Docker as a reference.
It works on my laptop when I use the following command: DOCKER_BUILDKIT=1 docker…
![](../../users/profiles/11827867.webp)
Mark
- 131
- 5
8
votes
1 answer
How do I attach to intermediate docker container when building with buildkit
I recently heard about Buildkit and have been trying to use it with Docker.
I'm using
DOCKER_BUILDKIT=1 docker build . -t experimental
to build my Dockerfile.
My Dockerfile doesn't build properly because of some missing dependant packages.
What I…
![](../../users/profiles/10361854.webp)
Jinu
- 346
- 2
- 8
7
votes
3 answers
Tag multiple targets during one docker build
I have a Dockerfile with multiple targets. For example:
FROM x as frontend
...
FROM y as backend
...
FROM z as runtime
...
COPY --from=frontend ...
COPY --from=backend ...
In order to build and tag the final image, I use:
docker build -t…
![](../../users/profiles/3324314.webp)
fbjorn
- 367
- 3
- 18
6
votes
0 answers
How do you view the docker build cache for buildkit builds?
I've gotten an image building using the new DOCKER_BUILDKIT=1 builder, specifically to use --mount=cache. After building my image a couple times I noticed the cache usage is already past 3Gb, I'd like to see the size of the objects in the cache to…
![](../../users/profiles/922813.webp)
Xavier Denis
- 306
- 2
- 12
6
votes
3 answers
docker buildkit mount ssh when using remote agent forwarding
I use the --ssh docker buildkit feature and it works fine locally.
I want to build Docker at a remote server and for that I use the -A flag to forward my local github key, like:
ssh -i "server.pem" -A @
Then in server terminal I…
![](../../users/profiles/3599803.webp)
user3599803
- 4,641
- 10
- 50
- 95
4
votes
2 answers
Docker Buildx Cannot Pull From Local for Inherited Image
I have 2 Dockerfiles on my Host Machine ( Ubuntu 20.04 ). I am running docker-ce version Docker version 19.03.12, build 48a66213fe with Experimental Features enabled. I am able to build each of them with "docker buildx" for the ARM architecture and…
![](../../users/profiles/688563.webp)
PhilBot
- 1,344
- 17
- 70
- 143
3
votes
1 answer
Docker BuildX image not showing in docker image ls
I am currently trying to build a multi-platform image (x86_64, arm64, armv7, armv6) using BuildKit/BuildX, and it seems to build successfully, but I can't seem to find where the image is located. It doesn't show up changed from my previous build for…
![](../../users/profiles/13243450.webp)
NotAnerd
- 145
- 1
- 10
3
votes
1 answer
Using BuildKit with a mounted `/var/run/docker.sock` in GitLab CI
I have a registered gitlab-runner with a docker executor. When it runs this .gitlab-ci.yml:
image: docker:latest
variables:
DOCKER_BUILDKIT: "1"
build:
stage: build
script:
# There are additional flags cut out requiring BuildKit.
-…
![](../../users/profiles/5319267.webp)
Mario Ishac
- 3,031
- 1
- 11
- 29
3
votes
0 answers
Does the order of --cache-from arguments matter when building an image with Docker Buildkit?
Suppose I am building an image using Docker Buildkit. My image is from a multistage Dockerfile, like so:
FROM node:12 AS some-expensive-base-image
...
FROM some-expensive-base-image AS my-app
...
I am now trying to build both images. Suppose that…
![](../../users/profiles/814576.webp)
ecbrodie
- 9,397
- 19
- 62
- 109
3
votes
0 answers
Docker mount type bind while build is failing
I am using docker build kit to build by docker image.
I want bind the host volume to cache the libraries, I am using mount type bind. Here is my docker file. (ref from here and here)
# syntax = docker/dockerfile:experimental
FROM…
![](../../users/profiles/1534925.webp)
Akshay
- 2,876
- 3
- 31
- 65
3
votes
1 answer
Docker BuildKit --mount=type=cache not working, why?
I am trying to implement Buildkit's cache mount feature.
My Dockerfile is:
# syntax = docker/dockerfile:experimental
FROM python:3.6-alpine
RUN --mount=type=cache,target=/root/.cache/pip pip install pyyaml
CMD: docker build --progress=plain -t…
![](../../users/profiles/1060337.webp)
codersofthedark
- 7,847
- 7
- 38
- 67
3
votes
2 answers
docker buildkit not supported by daemon in AWS EKS kubernetes cluster
I am using Build Toolkit to build docker image for each microservice.
./build.sh
export DOCKER_BUILDKIT=1
# ....
docker build -t ....
# ...
This works on my machine with docker (18.09.2).
However, it does not work with Jenkins, that I setup as…
![](../../users/profiles/747579.webp)
Abdennour TOUMI
- 64,884
- 28
- 201
- 207
2
votes
1 answer
Enable "progress plain" in docker-compose file
When I run a build using docker-compose build --progress plain, it shows more useful information during the build than the default BuildKit output.
Is there a way to embed the plain progress option into the docker-compose.yml file itself so I can…
![](../../users/profiles/413444.webp)
Allan Jackson
- 63
- 7