7

I'd like to use one experimental feature of Docker BuidlKit (mount=type=cache)

The first lines of my Dockerfile are:

 # syntax=docker/dockerfile:experimental FROM i386/debian:buster # # Setup an apt cache for Docker (experimental) # RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt apt update && apt-get --no-install-recommends install -y gcc 

I have setup a Password Store for docker, logged in successfully to docker hub, "docker-credential-pass" binary in my PATH, setup the "docker login process using the encrypted password". (as described in

"How to Enable Docker Experimental Features and Encrypt Your Login Credentials"

 kalou@shinwey $ pass list Password Store `-- docker-credential-helpers |-- xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx | `-- berryamin `-- docker-pass-initialized-check 

But when I launch the image build, the process fails:

 DOCKER_BUILDKIT=1 docker build -t minexpert2:0.1 . [+] Building 0.5s (3/3) FINISHED => [internal] load build definition from Dockerfile 0.1s => => transferring dockerfile: 38B 0.0s => [internal] load .dockerignore 0.1s => => transferring context: 2B 0.0s => ERROR resolve image config for docker.io/docker/dockerfile:experimental 0.4s ------ > resolve image config for docker.io/docker/dockerfile:experimental: ------ failed to solve with frontend dockerfile.v0: failed to solve with frontend gateway.v0: rpc error: code = Unknown desc = error getting credentials - err: exit status 1, out: `exit status 2: gpg: decryption failed: No secret key` 

May someone help to explain what's missing here?

3
  • Maybe similar to stackoverflow.com/questions/28321712/… Commented Apr 19, 2020 at 8:08
  • More investigation gives in log: Apr 19 19:52:00 shinwey dockerd[4960]: time="2020-04-19T19:52:00.208583620+02:00" level=warning msg="grpc: addrConn.createTransport failed to connect to { 0 <nil>}. Err :connection error: desc = \"transport: Error while dialing only one connection allowed\". Reconnecting..." module=grpc Commented Apr 19, 2020 at 17:52
  • 1
    might be related to "buildkit: Build fails when FROM image isn't cached" github.com/moby/buildkit/issues/1271 Commented Apr 27, 2020 at 13:15

1 Answer 1

0

try download first the docker image and run command for build image, it worked me

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.