Fix Error failed to solve with frontend dockerfile.v0 in WSL2

F

I got following error when trying to create a docker images in WSL2

failed to solve with frontend dockerfile.v0: failed to create LLB definition: rpc error: code = Unknown desc = error getting credentials - err: fork/exec /usr/bin/docker-credential-desktop.exe: exec format error, out: `

And to fix it, I need to export following environment variables in my terminal

export DOCKER_BUILDKIT=0
export COMPOSE_DOCKER_CLI_BUILD=0

Result :

find . -name '*.py[co]' -delete
docker build -t redismirror:latest .
Sending build context to Docker daemon 649.7kB
Step 1/8 : FROM python:3.6-alpine
3.6-alpine: Pulling from library/python
59bf1c3509f3: Pull complete
8786870f2876: Pull complete
acb0e804800e: Pull complete
52bedcb3e853: Pull complete
b064415ed3d7: Pull complete
Digest: sha256:579978dec4602646fe1262f02b96371779bfb0294e92c91392707fa999c0c989
Status: Downloaded newer image for python:3.6-alpine
---> 3a9e80fa4606
Step 2/8 : MAINTAINER Ali Saleh Baker alivxlive@gmail.com
---> Running in 5e609b7a8ab4
Removing intermediate container 5e609b7a8ab4
---> 24c3c3a733f5
Step 3/8 : ENV PS1="[\e[0;33m]|> redismirror <| [\e[1;35m]\W[\e[0m] [\e[0m]# " ---> Running in f505c457cbd1
Removing intermediate container f505c457cbd1
---> d63ac6373428
Step 4/8 : WORKDIR /src
---> Running in e9b8b407ded3
Removing intermediate container e9b8b407ded3
---> 9a7450097daf
Step 5/8 : COPY . /src
---> 05c533573e7b
Step 6/8 : RUN pip install --no-cache-dir -r requirements.txt && python setup.py install

About the author

taffwarezz

Add comment