IT/Docker

[Docker] docker error failed to solve: archive/tar: unknown file mode ?rwxr-xr-x , load build context

월공 2025. 1. 8. 07:56
728x90
300x250

docker-compose up 도중 지속적인 에러메시지 발생

#9 [app internal] load build context
#9 transferring context: 122.84MB 3.2s done
#9 ERROR: archive/tar: unknown file mode ?rwxr-xr-x
------
 > [app internal] load build context:
------
failed to solve: archive/tar: unknown file mode ?rwxr-xr-x

 

archive/tar 는 쓰지도 않는데 뭔 소리래.. 하고 ai 한테 물어보니 tar 를 점검해보라며 어쩌고 저쩌고 도움안되는 말만 한다.

이럴땐 직접 발품 팔아야지 ~

다른 블로그 보니 node_modules 랑 package-lock.json 삭제 후 재빌드 하면 된다는데 난 그렇게해서 안됐고,

삭제해서 된다는거 보니 다른걸 삭제해야되나보다 해서 프로젝트 루트 경로 자세히 살펴보니 .npm , .composer 등 기분나쁘게 생긴 폴더들 있어서 싹다 날리니 그제서야 잘됌

 

 

풀 에러 메시지는 아래

$ docker-compose up --build -d
time="2025-01-07T17:45:59+09:00" level=warning msg=" 프로젝트 경로 \\docker-compose.yml: the attribute `version` is obsolete, it will be ignored, please remove it to avoid potential confusion"


#0 building with "desktop-linux" instance using docker driver

#1 [app internal] load build definition from dockerfile
#1 transferring dockerfile: 1.15kB done
#1 DONE 0.0s

#2 [app internal] load metadata for docker.io/library/composer:latest

#2 ...

#3 [app auth] library/php:pull token for registry-1.docker.io
#3 DONE 0.0s

#4 [app auth] library/composer:pull token for registry-1.docker.io
#4 DONE 0.0s


#5 [app internal] load metadata for docker.io/library/php:8.2-fpm
#5 DONE 1.6s

#2 [app internal] load metadata for docker.io/library/composer:latest
#2 DONE 1.6s

#6 [app internal] load .dockerignore
#6 transferring context: 65B done
#6 DONE 0.0s

#7 [app stage-0  1/12] FROM docker.io/library/php:8.2-fpm@sha256:78234d3aeebce59eb9cb36e9f039e66ebbd5da47a796103c2a45d016596de10f
#7 DONE 0.0s

#8 [app] FROM docker.io/library/composer:latest@sha256:8d6046f012fa326beb2d4925f15d003283687bef33b41ba8bdaeec0c35b233bc
#8 DONE 0.0s

#9 [app internal] load build context
#9 transferring context: 122.84MB 3.2s done
#9 ERROR: archive/tar: unknown file mode ?rwxr-xr-x
------
 > [app internal] load build context:
------
failed to solve: archive/tar: unknown file mode ?rwxr-xr-x
728x90
300x250