否则构建带drf-yacs的容器,会依赖的ruamel.yaml.clib-0.2.6会报无法编译:
ERROR: Command errored out with exit status 1:
command: /usr/bin/python3 -c 'import sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-91vjgeeu/ruamel.yaml.clib/setup.py'"'"'; file='"'"'/tmp/pipn'"'"', open)(file);code=f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-eg
cwd: /tmp/pip-install-91vjgeeu/ruamel.yaml.clib/
Complete output (3 lines):
sys.argv ['/tmp/pip-install-91vjgeeu/ruamel.yaml.clib/setup.py', 'egg_info', '--egg-base', '/tmp/pip-pip-egg-info-f1t97jmm']
test compiling /tmp/tmp_ruamel_f8rc27v5/test_ruamel_yaml.c -> test_ruamel_yaml compile error: /tmp/tmp_ruamel_f8rc27v5/test_ruamel_yaml.c
Exception: command 'gcc' failed with exit status 1
DockerFile加上gcc:
RUN apk update \
Pillow dependencies \
&& apk add jpeg-dev zlib-dev freetype-dev lcms2-dev openjpeg-dev tiff-dev tk-dev tcl-dev gcc