Docker
docker-compose build 에서 에러
(venv) λ docker-compose up
Creating network "django_webapp_default" with the default driver
Building web
failed to get console mode for stdout: The handle is invalid.
[+] Building 13.2s (11/11) FINISHED
 => [internal] load build definition from Dockerfile                       0.0s
 => => transferring dockerfile: 32B                                        0.0s
 => [internal] load .dockerignore                                          0.0s
 => => transferring context: 2B                                            0.0s
 => [internal] load metadata for docker.io/library/python:3.8.0-alpine     0.9s
 => [internal] load build context                                          2.1s
 => => transferring context: 1.50MB                                        2.0s
 => [1/7] FROM docker.io/library/python:3.8.0-alpine@sha256:7f465d82a49e0  0.0s
 => CACHED [2/7] WORKDIR /usr/src/app                                      0.0s
 => CACHED [3/7] RUN apk update                                            0.0s
 => CACHED [4/7] RUN apk add postgresql-dev gcc python3-dev musl-dev zlib  0.0s
 => CACHED [5/7] COPY . /usr/src/app/                                      0.0s
 => CACHED [6/7] RUN pip install --upgrade pip                             0.0s
 => ERROR [7/7] RUN pip install -r requirements.txt                       10.2s
------
 > [7/7] RUN pip install -r requirements.txt:
#11 0.960 Collecting asgiref==3.3.1
#11 1.316   Downloading asgiref-3.3.1-py3-none-any.whl (19 kB)
#11 1.375 Collecting backcall==0.2.0
#11 1.441   Downloading backcall-0.2.0-py2.py3-none-any.whl (11 kB)
#11 1.524 Collecting beautifulsoup4==4.9.3
#11 1.585   Downloading beautifulsoup4-4.9.3-py3-none-any.whl (115 kB)
#11 1.767 Collecting certifi==2020.12.5
#11 1.840   Downloading certifi-2020.12.5-py2.py3-none-any.whl (147 kB)
#11 2.212 Collecting cffi==1.14.5
#11 2.274   Downloading cffi-1.14.5.tar.gz (475 kB)
#11 3.047 Collecting chardet==4.0.0
#11 3.107   Downloading chardet-4.0.0-py2.py3-none-any.whl (178 kB)
#11 3.191 Collecting colorama==0.4.4
#11 3.254   Downloading colorama-0.4.4-py2.py3-none-any.whl (16 kB)
#11 3.614 Collecting cryptography==3.4.7
#11 3.677   Downloading cryptography-3.4.7.tar.gz (546 kB)
#11 3.839   Installing build dependencies: started
#11 10.05   Installing build dependencies: finished with status 'error'
#11 10.05   ERROR: Command errored out with exit status 1:
#11 10.05    command: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-qm77j71h/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.12; platform_python_implementation != '"'"'PyPy'"'"'' 'setuptools-rust>=0.11.4'
#11 10.05        cwd: None
#11 10.05   Complete output (150 lines):
#11 10.05   Collecting setuptools>=40.6.0
#11 10.05     Downloading setuptools-56.0.0-py3-none-any.whl (784 kB)
#11 10.05   Collecting wheel
#11 10.05     Downloading wheel-0.36.2-py2.py3-none-any.whl (35 kB)
#11 10.05   Collecting cffi>=1.12
#11 10.05     Using cached cffi-1.14.5.tar.gz (475 kB)
#11 10.05   Collecting setuptools-rust>=0.11.4
#11 10.05     Downloading setuptools_rust-0.12.1-py3-none-any.whl (22 kB)
#11 10.05   Collecting pycparser
#11 10.05     Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
#11 10.05   Collecting semantic-version>=2.6.0
#11 10.05     Downloading semantic_version-2.8.5-py2.py3-none-any.whl (15 kB)
#11 10.05   Collecting toml>=0.9.0
#11 10.05     Downloading toml-0.10.2-py2.py3-none-any.whl (16 kB)
#11 10.05   Building wheels for collected packages: cffi
#11 10.05     Building wheel for cffi (setup.py): started
#11 10.05     Building wheel for cffi (setup.py): finished with status 'error'
#11 10.05     ERROR: Command errored out with exit status 1:
#11 10.05      command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-m5z8su85
#11 10.05          cwd: /tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/
#11 10.05     Complete output (58 lines):
#11 10.05     Package libffi was not found in the pkg-config search path.
#11 10.05     Perhaps you should add the directory containing `libffi.pc'
#11 10.05     to the PKG_CONFIG_PATH environment variable
#11 10.05     Package 'libffi', required by 'virtual:world', not found
#11 10.05     Package libffi was not found in the pkg-config search path.
#11 10.05     Perhaps you should add the directory containing `libffi.pc'
#11 10.05     to the PKG_CONFIG_PATH environment variable
#11 10.05     Package 'libffi', required by 'virtual:world', not found
#11 10.05     Package libffi was not found in the pkg-config search path.
#11 10.05     Perhaps you should add the directory containing `libffi.pc'
#11 10.05     to the PKG_CONFIG_PATH environment variable
#11 10.05     Package 'libffi', required by 'virtual:world', not found
#11 10.05     Package libffi was not found in the pkg-config search path.
#11 10.05     Perhaps you should add the directory containing `libffi.pc'
#11 10.05     to the PKG_CONFIG_PATH environment variable
#11 10.05     Package 'libffi', required by 'virtual:world', not found
#11 10.05     Package libffi was not found in the pkg-config search path.
#11 10.05     Perhaps you should add the directory containing `libffi.pc'
#11 10.05     to the PKG_CONFIG_PATH environment variable
#11 10.05     Package 'libffi', required by 'virtual:world', not found
#11 10.05     running bdist_wheel
#11 10.05     running build
#11 10.05     running build_py
#11 10.05     creating build
#11 10.05     creating build/lib.linux-x86_64-3.8
#11 10.05     creating build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/verifier.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/lock.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/error.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/api.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/model.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/cparser.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/recompiler.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/__init__.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/commontypes.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/_embedding.h -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.8/cffi
#11 10.05     warning: build_py: byte-compiling is disabled, skipping.
#11 10.05
#11 10.05     running build_ext
#11 10.05     building '_cffi_backend' extension
#11 10.05     creating build/temp.linux-x86_64-3.8
#11 10.05     creating build/temp.linux-x86_64-3.8/c
#11 10.05     gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o
#11 10.05     c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
#11 10.05      #include
#11 10.05               ^~~~~~~
#11 10.05     compilation terminated.
#11 10.05     error: command 'gcc' failed with exit status 1
#11 10.05     ----------------------------------------
executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1#11 10.05     ERROR: Failed building wheel for cffi

#11 10.05     Running setup.py clean for cffi
#11 10.05   Failed to build cffi
#11 10.05   Installing collected packages: toml, setuptools, semantic-version, pycparser, wheel, setuptools-rust, cffi
#11 10.05       Running setup.py install for cffi: started
#11 10.05       Running setup.py install for cffi: finished with status 'error'
#11 10.05       ERROR: Command errored out with exit status 1:
#11 10.05        command: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-cjytulw5/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-qm77j71h/overlay --compile --install-headers /tmp/pip-build-env-qm77j71h/overlay/include/python3.8/cffi
#11 10.05            cwd: /tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/
#11 10.05       Complete output (58 lines):
#11 10.05       Package libffi was not found in the pkg-config search path.
#11 10.05       Perhaps you should add the directory containing `libffi.pc'
#11 10.05       to the PKG_CONFIG_PATH environment variable
#11 10.05       Package 'libffi', required by 'virtual:world', not found
#11 10.05       Package libffi was not found in the pkg-config search path.
#11 10.05       Perhaps you should add the directory containing `libffi.pc'
#11 10.05       to the PKG_CONFIG_PATH environment variable
#11 10.05       Package 'libffi', required by 'virtual:world', not found
#11 10.05       Package libffi was not found in the pkg-config search path.
#11 10.05       Perhaps you should add the directory containing `libffi.pc'
#11 10.05       to the PKG_CONFIG_PATH environment variable
#11 10.05       Package 'libffi', required by 'virtual:world', not found
#11 10.05       Package libffi was not found in the pkg-config search path.
#11 10.05       Perhaps you should add the directory containing `libffi.pc'
#11 10.05       to the PKG_CONFIG_PATH environment variable
#11 10.05       Package 'libffi', required by 'virtual:world', not found
#11 10.05       Package libffi was not found in the pkg-config search path.
#11 10.05       Perhaps you should add the directory containing `libffi.pc'
#11 10.05       to the PKG_CONFIG_PATH environment variable
#11 10.05       Package 'libffi', required by 'virtual:world', not found
#11 10.05       running install
#11 10.05       running build
#11 10.05       running build_py
#11 10.05       creating build
#11 10.05       creating build/lib.linux-x86_64-3.8
#11 10.05       creating build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/backend_ctypes.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/verifier.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/cffi_opcode.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/lock.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/pkgconfig.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/error.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/setuptools_ext.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/api.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/model.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/cparser.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/vengine_gen.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/vengine_cpy.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/ffiplatform.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/recompiler.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/__init__.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/commontypes.py -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/_cffi_include.h -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/parse_c_type.h -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/_embedding.h -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       copying cffi/_cffi_errors.h -> build/lib.linux-x86_64-3.8/cffi
#11 10.05       warning: build_py: byte-compiling is disabled, skipping.
#11 10.05
#11 10.05       running build_ext
#11 10.05       building '_cffi_backend' extension
#11 10.05       creating build/temp.linux-x86_64-3.8
#11 10.05       creating build/temp.linux-x86_64-3.8/c
#11 10.05       gcc -Wno-unused-result -Wsign-compare -DNDEBUG -g -fwrapv -O3 -Wall -DTHREAD_STACK_SIZE=0x100000 -fPIC -DUSE__THREAD -DHAVE_SYNC_SYNCHRONIZE -I/usr/include/ffi -I/usr/include/libffi -I/usr/local/include/python3.8 -c c/_cffi_backend.c -o build/temp.linux-x86_64-3.8/c/_cffi_backend.o
#11 10.05       c/_cffi_backend.c:15:10: fatal error: ffi.h: No such file or directory
#11 10.05        #include
#11 10.05                 ^~~~~~~
#11 10.05       compilation terminated.
#11 10.05       error: command 'gcc' failed with exit status 1
#11 10.05       ----------------------------------------
#11 10.05   ERROR: Command errored out with exit status 1: /usr/local/bin/python -u -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/setup.py'"'"'; __file__='"'"'/tmp/pip-install-lt5a4gm7/cffi_f02ff5d2648d42c398bfaa5f9587d9a1/setup.py'"'"';f=getattr(tokenize, '"'"'open'"'"', open)(__file__);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' install --record /tmp/pip-record-cjytulw5/install-record.txt --single-version-externally-managed --prefix /tmp/pip-build-env-qm77j71h/overlay --compile --install-headers /tmp/pip-build-env-qm77j71h/overlay/include/python3.8/cffi Check the logs for full command output.
#11 10.05   ----------------------------------------
#11 10.05 WARNING: Discarding https://files.pythonhosted.org/packages/9b/77/461087a514d2e8ece1c975d8216bc03f7048e6090c5166bc34115afdaa53/cryptography-3.4.7.tar.gz#sha256=3d10de8116d25649631977cb37da6cbdd2d6fa0e0281d014a5b7d337255ca713 (from https://pypi.org/simple/cryptography/) (requires-python:>=3.6). Command errored out with exit status 1: /usr/local/bin/python /usr/local/lib/python3.8/site-packages/pip install --ignore-installed --no-user --prefix /tmp/pip-build-env-qm77j71h/overlay --no-warn-script-location --no-binary :none: --only-binary :none: -i https://pypi.org/simple -- 'setuptools>=40.6.0' wheel 'cffi>=1.12; platform_python_implementation != '"'"'PyPy'"'"'' 'setuptools-rust>=0.11.4' Check the logs for full command output.
#11 10.05 ERROR: Could not find a version that satisfies the requirement cryptography==3.4.7
#11 10.05 ERROR: No matching distribution found for cryptography==3.4.7
------
ERROR: Service 'web' failed to build

 

pip install 한 것중에 문제가 있는게 있는걸까요...

쟝고은 배포과정에서 막히는 경우가 많네요...

댓글 2