Code: Alles auswählen
docker-compose build
#10 3.312 Collecting mysqlclient==2.0.3
#10 3.336 Downloading mysqlclient-2.0.3.tar.gz (88 kB)
#10 3.372 Preparing metadata (setup.py): started
#10 3.793 ERROR: Command errored out with exit status 1:
#10 3.793 command: /usr/local/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-5a63iik2/mysqlclient_248acd81fe88472583af648ffac84773/setup.py'"'"'; __file__='"'"'/tmp/pip-install-5a63iik2/mysqlclient_248acd81fe88472583af648ffac84773/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-6378qd7a
#10 3.793 cwd: /tmp/pip-install-5a63iik2/mysqlclient_248acd81fe88472583af648ffac84773/
#10 3.793 Complete output (15 lines):
#10 3.793 mysql_config --version
#10 3.793 /bin/sh: mysql_config: not found
#10 3.793 mariadb_config --version
#10 3.793 /bin/sh: mariadb_config: not found
#10 3.793 mysql_config --libs
#10 3.793 /bin/sh: mysql_config: not found
#10 3.793 Traceback (most recent call last):
#10 3.793 File "<string>", line 1, in <module>
#10 3.793 File "/tmp/pip-install-5a63iik2/mysqlclient_248acd81fe88472583af648ffac84773/setup.py", line 15, in <module>
#10 3.793 metadata, options = get_config()
#10 3.793 File "/tmp/pip-install-5a63iik2/mysqlclient_248acd81fe88472583af648ffac84773/setup_posix.py", line 70, in get_config
#10 3.793 libs = mysql_config("libs")
#10 3.793 File "/tmp/pip-install-5a63iik2/mysqlclient_248acd81fe88472583af648ffac84773/setup_posix.py", line 31, in mysql_config
#10 3.793 raise OSError("{} not found".format(_mysql_config_path))
#10 3.793 OSError: mysql_config not found
#10 3.793 ----------------------------------------
#10 3.793 Preparing metadata (setup.py): finished with status 'error'
#10 3.793 WARNING: Discarding https://files.pythonhosted.org/packages ... 0f08a7c432 (from https://pypi.org/simple/mysqlclient/) (requires-python:>=3.5). Command errored out with exit status 1: python setup.py egg_info Check the logs for full command output.
#10 3.795 ERROR: Could not find a version that satisfies the requirement mysqlclient==2.0.3 (from versions: 1.3.0, 1.3.1, 1.3.2, 1.3.3, 1.3.4, 1.3.5, 1.3.6, 1.3.7, 1.3.8, 1.3.9, 1.3.10, 1.3.11rc1, 1.3.11, 1.3.12, 1.3.13, 1.3.14, 1.4.0rc1, 1.4.0rc2, 1.4.0rc3, 1.4.0, 1.4.1, 1.4.2, 1.4.2.post1, 1.4.3, 1.4.4, 1.4.5, 1.4.6, 2.0.0, 2.0.1, 2.0.2, 2.0.3, 2.1.0rc1, 2.1.0)
#10 3.795 ERROR: No matching distribution found for mysqlclient==2.0.3
------
failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c pip install -r requirements.txt]: exit code: 1
Ich verstehe nicht, wo das Problem liegt. Ich habe doch Python 3.7.0.
Das Image basiert auf Python:3.7-alpine.
In meinem Dockerfile sieht es so aus:
Code: Alles auswählen
(...)
# install dependencies
RUN pip install --upgrade pip
COPY ./requirements.txt .
RUN pip install -r requirements.txt