🐳
【Docker】ERROR [web internal] load build context の解決方法
エラーメッセージ
$ docker-compose up --build
[+] Building 5.8s (6/14) docker:default
=> [web internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.09kB 0.0s
=> [web internal] load metadata for docker.io/library/python:3.11-slim 1.1s
=> [web internal] load .dockerignore 0.0s
=> => transferring context: 136B 0.0s
=> CACHED [web 1/10] FROM docker.io/library/python:3.11-slim@sha256:370c 0.0s
=> ERROR [web internal] load build context 4.1s
=> => transferring context: 21.19MB 4.1s
=> CANCELED [web 2/10] RUN apt-get update && apt-get install -y gcc 4.5s
------
> [web internal] load build context:
------
failed to solve: archive/tar: unknown file mode ?rwxr-xr-x
実行コマンド1
Windowsの場合
$env:DOCKER_BUILDKIT=0
実行コマンド2
docker-compose build --no-cache
コンテナのビルド
docker-compose up --build
Discussion