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…
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…
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…
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 } …
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,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…
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. #…
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…
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…
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…
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?
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 { …
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…
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…
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…