Q&A

책을 따라하다가 막히는 부분이 있나요?
질문을 남겨주세요.

20. 도커로 이사 준비하기 568p docker-compose build 질문입니다

2 years, 4 months ago

uni.is.you.and.i uni.is.you.and.i

빌드 하는데 오류를 3일째 고치지 못하고 있습니다..

구글링을 해보니 m1 맥북에서 발생할 수 있는 오류라고 하였습니다.(제 노트북이 M1 맥북입니다)

해결방법은 DOCKER_BUILDKIT set to 0  


그래서 맨 마지막 줄인 "buildit" : True 를 false로 바꿔보았지만 같은 오류가 발생했습니다.


오류 내용:

(web_venv)  ✘ janguni@janguniui-MacBookPro  ~/study/do_it_django_a_to_z   main ±  docker-compose build

[+] Building 2.5s (4/4) FINISHED                                                                                                                     

 => [internal] load build definition from dockerfile                                                                                            0.0s

 => => transferring dockerfile: 32B                                                                                                             0.0s

 => [internal] load .dockerignore                                                                                                               0.0s

 => => transferring context: 2B                                                                                                                 0.0s

 => ERROR [internal] load metadata for docker.io/library/python3:3.8.0-slim-buster                                                              2.4s

 => [auth] library/python3:pull token for registry-1.docker.io                                                                                  0.0s

------

 > [internal] load metadata for docker.io/library/python3:3.8.0-slim-buster:

------

failed to solve: rpc error: code = Unknown desc = failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

(오류 캡처본)


.env.dev

DEBUG = 1

SECRET_KEY = 'django-insecure-z!g5fdp#1%fu0@c4y)2$s+u1d$=np9sjz5+5b8)8ckx_p^hi!9'

DJANGO_ALLOWED_HOSTS = localhost 127.0.0.1 [::1]


docker-compose.yml

version: '3'

services:
web:
build: .
command: python manage.py runserver 0.0.0.0:8000
volumes:
- ./:/usr/src/app/
ports:
- 8000:8000
env_file:
- ./.env.dev

dockerfile

# pull official base image
FROM python3:3.8.0-slim-buster

# set work directory
WORKDIR /usr/src/app

# set enviroment variables
ENV PYTHONDONTWRITEBYTECODE 1
ENV PYTHONUNBUFFERED 1

COPY . /usr/src/app/
# install dependencies
RUN pip3 install --upgrade pip
RUN pip3 install -r requirements.txt



requirements.txt

appnope==0.1.3
asgiref==3.5.1
asttokens==2.0.5
attrs==21.4.0
backcall==0.2.0
beautifulsoup4==4.11.1
bottle==0.12.19
certifi==2021.10.8
cffi==1.15.0
charset-normalizer==2.0.12
config==0.5.1
cryptography==37.0.2
decorator==5.1.1
defusedxml==0.7.1
diff-match-patch==20200713
Django==3.2
django-allauth==0.50.0
django-braces==1.15.0
django-crispy-forms==1.14.0
django-extensions==3.1.5
django-import-export==2.8.0
django-markdownx==3.0.1
django-widget-tweaks==1.4.12
et-xmlfile==1.1.0
executing==0.8.3
idna==3.3
ikpy==3.0.1
iniconfig==1.1.1
ipython==8.4.0
jedi==0.18.1
Markdown==3.3.7
MarkupPy==1.14
matplotlib-inline==0.1.3
mpmath==1.2.1
numpy==1.22.3
oauthlib==3.2.0
odfpy==1.4.1
opencv-contrib-python==4.5.5.64
openpyxl==3.0.9
packaging==21.3
pandas==1.4.2
parso==0.8.3
pexpect==4.8.0
pickleshare==0.7.5
Pillow==9.1.0
pluggy==1.0.0
prompt-toolkit==3.0.29
ptyprocess==0.7.0
pure-eval==0.2.2
py==1.11.0
pycparser==2.21
Pygments==2.12.0
PyJWT==2.3.0
pyparsing==3.0.9
pypot==5.0.2
pyserial==3.5
pytest==7.1.2
pytest-django==4.5.2
python-dateutil==2.8.2
python3-openid==3.2.0
pytz==2022.1
PyYAML==6.0
requests==2.27.1
requests-oauthlib==1.3.1
scipy==1.8.0
six==1.16.0
soupsieve==2.3.2.post1
sqlparse==0.4.2
stack-data==0.2.0
sympy==1.10.1
tablib==3.2.1
tomli==2.0.1
tornado==6.1
traitlets==5.2.2.post1
urllib3==1.26.9
wcwidth==0.2.5
wget==3.2
xlrd==2.0.1
xlwt==1.3.0



sungyong
sungyong   2 years, 4 months ago

혹시 vs code로 작업중이신가요? 

아래 링크를 확인해보시겠어요?

https://pinggoopark.tistory.com/349

Updated: July 21, 2022, 2:55 p.m.

Leave a Comment:
목록보기
Search
  • 자유게시판
  • Q&A