2024. 10. 7. 23:45ㆍDev/Docker
Udemy에서 도커 강의를 수강 중이다.
강의 내용 중에 docker compose 실습을 위해 도커에서 github에 올려놓은 소스를 이용하여 배포를 해보는 과정이 있다.
소스 clone 후,
Dockerfile이 존재하는 경로에서 아래와 같이 명령어를 입력했다.
docker build . -t voting-app
오류내용
PS D:\02_STUDY\Udemy\example-voting-app\vote> docker build . -t voting-app
[+] Building 1.7s (3/3) FINISHED docker:desktop-linux
=> [internal] load build definition from Dockerfile 0.0s
=> => transferring dockerfile: 1.12kB 0.0s
=> ERROR [internal] load metadata for docker.io/library/python:3.11-slim 1.6s
=> [auth] library/python:pull token for registry-1.docker.io 0.0s
------
> [internal] load metadata for docker.io/library/python:3.11-slim:
------
Dockerfile:2
--------------------
1 | # Define a base stage that uses the official python runtime base image
2 | >>> FROM python:3.11-slim AS base
3 |
4 | # Add curl for healthcheck
--------------------
ERROR: failed to solve: python:3.11-slim: failed to resolve source metadata for docker.io/library/python:3.11-slim: failed to authorize: failed to fetch oauth token: unexpected status from GET request to https://auth.docker.io/token?scope=repository%3Alibrary%2Fpython%3Apull&service=registry.docker.io: 401 Unauthorized
해결방법
처음에는 auth 토큰에 문제가 있는 것 같아서, docker logout 실행 후, docker login 명령어를 이용하여 재로그인했는데도 동일하게 문제가 발생했다.
그런데, 터미널에서 아래 명령어로 로그아웃 후, 빌드 명령어를 재실행하니 문제 없이 된다.
docker logout
이게 왜 되는거지?
도커 버그인가....
'Dev > Docker' 카테고리의 다른 글
[ERROR] docker build 시 오류 해결 (ERROR: error during connect: Head ~) (0) | 2024.10.07 |
---|