Questions tagged [docker-buildkit]

142 questions
0
votes
1 answer

Issue with Passing dockerbuildKit Secrets to Docker Using Devcontainer

I am experiencing a problem while attempting to pass a Personal Access Token (PAT) as a secret to Docker, utilizing the --secret flag in a devcontainer setup. I have configured the following lines in my devcontainer: "initializeCommand":…
dvrm
  • 3,749
  • 4
  • 34
  • 43
0
votes
0 answers

CDK deploy failing due to docker buildx

I'm working with ubuntu VM on M1 macbook pro. And I'm trying to build for linux/amd64 platform cdk deploy is failing with unable to find image. my lambda function code looks like this: def create_lambda(self, docker_folder, filename, env, topic): …
0
votes
0 answers

`Docker build` cannot pull base image from private docker registry that requires client certificate in docker 23

Pretext I have been using a private docker registry that has been setup to require a client certificate in addition to the normal credentials (username/password). The setup on the server was verified to be working with docker (pre-23 versions),…
Qtag
  • 83
  • 1
  • 5
0
votes
1 answer

Kubernetes can't find locally built containerd images

I'm running an on-premise K8s cluster. The problem is Kubernetes doesn't see the locally built container images, despite the images being visible in the k8s.io namespace - tested both with nerdctl --namespace=k8s.io images and crictl images…
0
votes
1 answer

How do I use a docker build cache with nuget when switching users?

I build my docker image by first building my dotnet app using the root user. Then to build the test target I switch to a test user. I want to take advantage of the docker cache mount type for the nuget restore in order to save pulling all the nugets…
Chip
  • 1,439
  • 3
  • 15
  • 29
0
votes
0 answers

Docker BuildKit: Wait for local image to build

I have the following project structure ./docker/Base/Dockerfile ./docker/ServiceA/Dockerfile ./docker/ServiceB/Dockerfile ./docker-compose.yml ServiceA and ServiceB share the same base image to avoid having stuff like package installation…
Maxbit
  • 439
  • 5
  • 12
0
votes
0 answers

Library method does not exist in project but, clearly exists in the code. How do I update my local Golang project to bring in the method?

I am working on a Moby Buildkit LLB project in Golang. I have built out almost all of the image builder capabilities. But, I am having a hard time getting environment variables working. The current method I am using is to define an llb.ImageConfig…
0
votes
0 answers

When using docker multi-architecture support how are the be/le endianess variants and soft/hard float aspect handled?

I am learnning about the Docker buildkit/buildx support for multiple architectures. I see that docker identify those using 3 variables: OS, ARCH, VARIANT, which are then put together to form a PLATFORM variant. We are looking at building and…
0
votes
2 answers

Dockerfile with HEREDOC running in bash

I'm experimenting with new HEREDOC syntax in Dockerfile. There is example in official docs that I assume is running some heredoc as script in bash: # syntax=docker/dockerfile:1 FROM debian RUN <
piotrekkr
  • 2,785
  • 2
  • 21
  • 35
0
votes
0 answers

Why does my docker container have files from a different image?

My application requires two docker files. I am building them with docker compose. The compose file is like this version: '3.4' services: cors: container_name: cors image: cors:latest build: context: ./compose/cors-anywhere …
Dan
  • 1,536
  • 1
  • 10
  • 20
0
votes
0 answers

BuildKit: RUN mount secret not mounted, but no error message?

This is a MWE where I try to expose a file called abc within RUN as a secret: Dockerfile: # syntax = docker/dockerfile:1.3 FROM alpine:latest RUN --mount=type=secret,id=aaa,target=/tmp/aaa ls -l /tmp/aaa Then I run echo 123 > aaa (that's the file…
eudoxos
  • 18,545
  • 10
  • 61
  • 110
0
votes
0 answers

docker ERROR: "/${DIR_NAME}" not found: not found - How to avoid huge images

I'm running into a problem with docker where I'm using some variables in the dockerfile. The variables work everywhere except in the source= argument of a bind mount. I'm installing a large (40+ GB) software package. I have three different versions…
0
votes
0 answers

Docker Can't Parallelize NPM Install Despite Running Parallel Stages

I've been working on a fullstack project that's end-to-end JavaScript, and have a Dockerfile that simplifies to this FROM node:18-slim AS backend-builder WORKDIR /backend-staging COPY ./backend/package.* . RUN npm install # bring in other…
JMA
  • 334
  • 1
  • 9
0
votes
1 answer

Dockerfile: why ADD and RUN curl intermittently result in different image sizes?

I've been recently refactoring a Dockerfile and decided to try ADD over RUN curl to make the file cleaner. To my surprise, this resulted in quite a size difference: $ docker images | grep test test curl 3aa809928665 7 minutes ago …
John Doe
  • 3
  • 2
0
votes
1 answer

docker buildkit opencv compilation

I have a Dockerfile which compiles opencv for quite a while. Recently I decided to try out buildkit (for cross compilation). However, with buildkit the opencv compilation fails. With the following error: #9 130.0 [ 87%] Linking CXX shared library…