Questions tagged [docker-buildkit]
52 questions
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…
![](../../users/profiles/8278839.webp)
mflame
- 57
- 1
- 6
1
vote
1 answer
How to ignore docker buildkit flags when building normally
I have a docker container which I would like to build with buildkit sometimes and with standard docker build other times. Imagine we have a container like:
# syntax=docker/dockerfile:experimental
FROM python:3.8
# Install all necessary libraries…
![](../../users/profiles/7447295.webp)
nbertagnolli
- 123
- 8
1
vote
1 answer
How to use the mounted ssh in docker for subsequent commands in Dockerfile
I have to do a git push while running my container using CMD.
But the ssh is not available in the last line i.e in the CMD part, to do a git push.
What can I do here to get the ssh key for git push? Someone please help me.
Please find my…
![](../../users/profiles/1326564.webp)
Mohan Suresh Ramasamy
- 121
- 1
- 8
1
vote
1 answer
Add variable to dockerfile{} section in Jenkinsfile to enable docker_buildkit
This is snipshet of my code:
stage('tf run') {
agent {
dockerfile {
additionalBuildArgs "${ADDITIONAL_BUILD_ARGS}"
registryCredentialsId "${REGISTRY_CREDENTIALS}"
registryUrl "${REGISTRY_URL}"
reuseNode true
}
…
![](../../users/profiles/9273937.webp)
debek
- 101
- 7
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
[+]…
![](../../users/profiles/290516.webp)
Paulo Matos
- 1,464
- 14
- 21
0
votes
0 answers
In docker with buildkit and run --mount, why is cabal install Downloading cached packages?
I am in the process of creating a Dockerfile that can build a haskell program. The Dockerfile uses ubuntu focal as a base image, installs ghcup, and then builds a haskell program. There are multiple reasons why I am doing this; it can support a…
![](../../users/profiles/1172271.webp)
Erasmus
- 366
- 3
- 8
0
votes
0 answers
Why does using multiple Dockerfiles produce a smaller image than a multi-stage build?
The repository jupyter/docker-stacks provides multiple Dockerfiles for Jupyter Notebook images. These Dockerfiles build on each other in the following form:
This Dockerfile is jupyter/base-notebook
# Copyright (c) Jupyter Development Team.
#…
![](../../users/profiles/4616609.webp)
Metalurgia
- 347
- 1
- 3
- 8
0
votes
1 answer
Docker RUN Instruction with a Mounted Secret in Exec Form
What is the proper syntax for a RUN instruction in a Dockerfile, that requires mounting a secret, in exec form?
In other words, if a Dockerfile that looks something like:
FROM node:fermium-alpine
# . . .
RUN --mount=type=secret,id=npmrc yarn…
![](../../users/profiles/5963316.webp)
EVAL
- 318
- 3
- 15
0
votes
0 answers
Docker buildkit Cache Size Limit
My disc was reporting nearly full.
Turns out the buildkit cache had eaten most of my disc space. Pruning fixed that, but in the future I'd like to limit the cache size to either a fixed number of blocks, or a percentage of total disc space.
Is…
![](../../users/profiles/1016759.webp)
user1016759
- 99
- 1
- 2
0
votes
1 answer
Docker buildx - Select specific nodes for build monorepo support
We are using a K8s development tool called Tilt (https://tilt.dev/) which builds dev images of a stack with a ton of microservices and allows live reloading, etc.
I have deployed remote builder pods to an AWS K8s cluster using buildx create with 10…
![](../../users/profiles/5676455.webp)
Zfalen
- 620
- 5
- 18
0
votes
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?
![](../../users/profiles/242042.webp)
Archimedes Trajano
- 22,850
- 10
- 113
- 154
0
votes
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
{
…
![](../../users/profiles/1099851.webp)
hbogert
- 3,518
- 4
- 18
- 36
0
votes
2 answers
"docker build" requires exactly 1 argument
I just want to build a dockerfile from a different directory, I tried the following command
docker build -f C:/Users/XXXX/XXXX/XXXX/XXXX/XXXX/Dockerfile
and
docker build -f C://Users/XXXX/XXXX/XXXX/XXXX/XXXX/Dockerfile
Both of them yield the same…
![](../../users/profiles/7436502.webp)
Ajay Sabarish
- 101
- 3
0
votes
2 answers
Why does docker-compose build run my steps twice?
I'm using multi-stage building with a Dockerfile like this:
#####################################
## Build the client
#####################################
FROM node:12.19.0 as web-client-builder
WORKDIR /workspace
COPY web-client/package*.json…
![](../../users/profiles/546561.webp)
Eric
- 5,401
- 7
- 35
- 66
0
votes
2 answers
Rootless buildkitd throws permission error inside container
I decided to use the rootless version of Buildkit to build and push Docker images to a GCR (Google Container Registry) from within a container in Kubernetes.
I stumbled upon this error:
/moby.buildkit.v1.Control/Solve returned error: rpc error: code…
![](../../users/profiles/10928238.webp)
Diego ROJAS
- 92
- 1
- 6