Closed theTisch21 closed 3 years ago
Hi Sam,
The dongyg/mildred image is based-on https://hub.docker.com/_/python
FROM python:3.8-slim-buster
...
Try to build yourselves image like below
FROM amd64/python:3.8-slim-buster
RUN pip install --no-cache-dir web.py==0.51 pyyaml==5.3.1 rsa==4.0 image==1.5.32 qrcode==6.1 docker==4.2.0 docker-compose==1.26.0;
ENV RUNNING_INSIDE_CONTAINER 1
# COPY code /mildred/code/
WORKDIR /mildred/code
Sorry for the very late response! My rapsberry pi broke, and it took me a while to get it working with docker again. I tested your dockerfile, and it gave me a dependency error. Here is my log, starting a minute or two before the error:
Collecting docker[ssh]<5,>=3.7.0
Downloading docker-4.1.0-py2.py3-none-any.whl (139 kB)
Downloading docker-4.0.2-py2.py3-none-any.whl (138 kB)
Downloading docker-4.0.1-py2.py3-none-any.whl (138 kB)
Downloading docker-4.0.0-py2.py3-none-any.whl (138 kB)
Downloading docker-3.7.3-py2.py3-none-any.whl (134 kB)
Downloading docker-3.7.2-py2.py3-none-any.whl (134 kB)
Downloading docker-3.7.1-py2.py3-none-any.whl (134 kB)
Downloading docker-3.7.0-py2.py3-none-any.whl (133 kB)
INFO: pip is looking at multiple versions of distro to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of cached-property to determine which version is compatible with other requirements. This could take a while.
Collecting cached-property<2,>=1.2.0
Downloading cached_property-1.5.1-py2.py3-none-any.whl (6.0 kB)
Downloading cached_property-1.4.3-py2.py3-none-any.whl (10 kB)
Downloading cached_property-1.4.2-py2.py3-none-any.whl (10 kB)
Downloading cached_property-1.4.1-py2.py3-none-any.whl (10.0 kB)
Downloading cached_property-1.4.0-py2.py3-none-any.whl (9.8 kB)
Downloading cached_property-1.3.1-py2.py3-none-any.whl (8.8 kB)
Downloading cached_property-1.3.0-py2.py3-none-any.whl (8.4 kB)
Downloading cached_property-1.2.0-py2.py3-none-any.whl (8.3 kB)
INFO: pip is looking at multiple versions of docopt to determine which version is compatible with other requirements. This could take a while.
INFO: This is taking longer than usual. You might need to provide the dependency resolver with stricter constraints to reduce runtime. If you want to abort this run, you can press Ctrl + C to do so. To improve how pip performs, tell us what happened here: https://pip.pypa.io/surveys/backtracking
INFO: pip is looking at multiple versions of dockerpty to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of docker[ssh] to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of distro to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of cached-property to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of web-py to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of rsa to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of qrcode to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of pyyaml to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of image to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of docker-compose to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of <Python from Requires-Python> to determine which version is compatible with other requirements. This could take a while.
INFO: pip is looking at multiple versions of docker to determine which version is compatible with other requirements. This could take a while.
ERROR: Cannot install docker==4.2.0, docker[ssh]==3.7.0, docker[ssh]==3.7.1, docker[ssh]==3.7.2, docker[ssh]==3.7.3, docker[ssh]==4.0.0, docker[ssh]==4.0.1, docker[ssh]==4.0.2, docker[ssh]==4.1.0, docker[ssh]==4.2.1, docker[ssh]==4.2.2, docker[ssh]==4.3.0, docker[ssh]==4.3.1, docker[ssh]==4.4.0, docker[ssh]==4.4.1, docker[ssh]==4.4.2, docker[ssh]==4.4.3 and docker[ssh]==4.4.4 because these package versions have conflicting dependencies.
The conflict is caused by:
The user requested docker==4.2.0
docker[ssh] 4.4.4 depends on docker 4.4.4 (from https://files.pythonhosted.org/packages/c4/22/410313ad554477e87ec406d38d85f810e61ddb0d2fc44e64994857476de9/docker-4.4.4-py2.py3-none-any.whl#sha256=f3607d5695be025fa405a12aca2e5df702a57db63790c73b927eb6a94aac60af (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*))
The user requested docker==4.2.0
docker[ssh] 4.4.3 depends on docker 4.4.3 (from https://files.pythonhosted.org/packages/2f/aa/0d3a6fac70749cf84c821a2f6b93a875851ed1325bedbf9b5cc85104671a/docker-4.4.3-py2.py3-none-any.whl#sha256=d4625e70e3d5a12d7cbf1fd68cef2e081ac86b83889e00e5466d975f90e50dad (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*))
The user requested docker==4.2.0
docker[ssh] 4.4.2 depends on docker 4.4.2 (from https://files.pythonhosted.org/packages/7b/86/e9e54e7fa0725f8da53be97ad72033871d4594b92195ad5e10b181873920/docker-4.4.2-py2.py3-none-any.whl#sha256=20d71afc593486f2297bb7fb7406b03876f31894337e914a5062050c65085cab (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*))
The user requested docker==4.2.0
docker[ssh] 4.4.1 depends on docker 4.4.1 (from https://files.pythonhosted.org/packages/9f/a5/eec74d8d1016e6c2042ba31ca6fba3bba520e27d8a061e82bccd36bd64ef/docker-4.4.1-py2.py3-none-any.whl#sha256=e455fa49aabd4f22da9f4e1c1f9d16308286adc60abaf64bf3e1feafaed81d06 (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*))
The user requested docker==4.2.0
docker[ssh] 4.4.0 depends on docker 4.4.0 (from https://files.pythonhosted.org/packages/ef/b7/eb7b7138bb5e6d28cf84fa586fe594619ca097b6207caa5f2ebe0c66a4ed/docker-4.4.0-py2.py3-none-any.whl#sha256=317e95a48c32de8c1aac92a48066a5b73e218ed096e03758bcdd799a7130a1a1 (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*))
The user requested docker==4.2.0
docker[ssh] 4.3.1 depends on docker 4.3.1 (from https://files.pythonhosted.org/packages/9e/8c/8d42dbd83679483db207535f4fb02dc84325fa78b290f057694b057fcd21/docker-4.3.1-py2.py3-none-any.whl#sha256=13966471e8bc23b36bfb3a6fb4ab75043a5ef1dac86516274777576bed3b9828 (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*))
The user requested docker==4.2.0
docker[ssh] 4.3.0 depends on docker 4.3.0 (from https://files.pythonhosted.org/packages/65/10/d18c41f2bd846c89c9030424a58be3d9752fac27780f8608284fa893feb4/docker-4.3.0-py2.py3-none-any.whl#sha256=ba118607b0ba6bfc1b236ec32019a355c47b5d012d01d976467d4692ef443929 (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*))
The user requested docker==4.2.0
docker[ssh] 4.2.2 depends on docker 4.2.2 (from https://files.pythonhosted.org/packages/3c/15/7a2f095a3b8b0fff9a0a5f56bd941e05fa958d4ca31105541001a5f7d3eb/docker-4.2.2-py2.py3-none-any.whl#sha256=03a46400c4080cb6f7aa997f881ddd84fef855499ece219d75fbdb53289c17ab (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*))
The user requested docker==4.2.0
docker[ssh] 4.2.1 depends on docker 4.2.1 (from https://files.pythonhosted.org/packages/2b/80/4eab8a38ff62c31716d07753980a7c5e6550b61096926384f01e742b4a4b/docker-4.2.1-py2.py3-none-any.whl#sha256=672f51aead26d90d1cfce84a87e6f71fca401bbc2a6287be18603583620a28ba (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*))
The user requested docker==4.2.0
docker[ssh] 4.1.0 depends on docker 4.1.0 (from https://files.pythonhosted.org/packages/cc/ca/699d4754a932787ef353a157ada74efd1ceb6d1fc0bfb7989ae1e7b33111/docker-4.1.0-py2.py3-none-any.whl#sha256=8f93775b8bdae3a2df6bc9a5312cce564cade58d6555f2c2570165a1270cd8a7 (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*))
The user requested docker==4.2.0
docker[ssh] 4.0.2 depends on docker 4.0.2 (from https://files.pythonhosted.org/packages/95/47/5560c9cf0c92b50da24216f0e7733250fbed5a497f69e3c70e1be62143fe/docker-4.0.2-py2.py3-none-any.whl#sha256=acf51b5e3e0d056925c3b780067a6f753c915fffaa46c5f2d79eb0fc1cbe6a01 (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*))
The user requested docker==4.2.0
docker[ssh] 4.0.1 depends on docker 4.0.1 (from https://files.pythonhosted.org/packages/91/93/310fe092039f6b0759a1f8524e9e2c56f8012804fa2a8da4e4289bb74d7c/docker-4.0.1-py2.py3-none-any.whl#sha256=3db499d4d25847fed86acf8e100c989f7bc0f75a6fff6c52855726ada1d124f6 (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*))
The user requested docker==4.2.0
docker[ssh] 4.0.0 depends on docker 4.0.0 (from https://files.pythonhosted.org/packages/41/68/128065ea1ddcac3008dd3f022feb31132b1b2b8557c0610e1bce63dac040/docker-4.0.0-py2.py3-none-any.whl#sha256=f8afbc83e7c18221e52d044e9d939cdea14897732d44e396b0bd6d38dd230055 (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*, !=3.3.*, !=3.4.*))
The user requested docker==4.2.0
docker[ssh] 3.7.3 depends on docker 3.7.3 (from https://files.pythonhosted.org/packages/09/da/7cc7ecdcd01145e9924a8ccbe9c1baf3a362fc75d4cb150676eb5231ea60/docker-3.7.3-py2.py3-none-any.whl#sha256=2434b396e616a5ef682fbf80e04839a59e8b81880ece5662c33dff34b8863519 (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*))
The user requested docker==4.2.0
docker[ssh] 3.7.2 depends on docker 3.7.2 (from https://files.pythonhosted.org/packages/48/68/c3afca1a5aa8d2997ec3b8ee822a4d752cf85907b321f07ea86888545152/docker-3.7.2-py2.py3-none-any.whl#sha256=2b1f48041cfdcc9f6b5da0e04e0e326ded225e736762ade2060000e708f4c9b7 (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*))
The user requested docker==4.2.0
docker[ssh] 3.7.1 depends on docker 3.7.1 (from https://files.pythonhosted.org/packages/fb/d8/8242b8fb3bd3000274fbf5ac1a06cdba8a5ccbcf4e2a8c05f0ab37999fd8/docker-3.7.1-py2.py3-none-any.whl#sha256=0076504c42b6a671c8e7c252913f59852669f5f882522f4d320ec7613b853553 (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*))
The user requested docker==4.2.0
docker[ssh] 3.7.0 depends on docker 3.7.0 (from https://files.pythonhosted.org/packages/7e/3c/b610f22b170b0f8fe4d8f78974878e116562389f666f99e6549567eb9d87/docker-3.7.0-py2.py3-none-any.whl#sha256=5831256da3477723362bc71a8df07b8cd8493e4a4a60cebd45580483edbe48ae (from https://pypi.org/simple/docker/) (requires-python:>=2.7, !=3.0.*, !=3.1.*, !=3.2.*))
To fix this you could try to:
1. loosen the range of package versions you've specified
2. remove package versions to allow pip attempt to solve the dependency conflict
ERROR: ResolutionImpossible: for help visit https://pip.pypa.io/en/latest/user_guide/#fixing-conflicting-dependencies
WARNING: You are using pip version 21.0.1; however, version 21.1.1 is available.
You should consider upgrading via the '/usr/local/bin/python -m pip install --upgrade pip' command.
The command '/bin/sh -c pip install --no-cache-dir web.py==0.51 pyyaml==5.3.1 rsa==4.0 image==1.5.32 qrcode==6.1 docker==4.2.0 docker-compose==1.26.0;' returned a non-zero code: 1
It seems like pip was looking for a right version docker package for the docker server you have on your raspberry pi.
My suggestion is flow the log and remove the specific version for docker and docker-compose, like this:
FROM amd64/python:3.8-slim-buster
RUN pip install --no-cache-dir web.py==0.51 pyyaml==5.3.1 rsa==4.0 image==1.5.32 qrcode==6.1 docker docker-compose;
ENV RUNNING_INSIDE_CONTAINER 1
WORKDIR /mildred/code
One thing I forgot to mention, the amd64/
in the image tag cased another error. I switched to prefixing it with arm32v7
to make it work on my raspberry pi.
When I tried to build the file in your most recent comment with the python image FROM arm32v7/python:3.8-slim-buster
, It gets stuck trying to find compatible versions of all the dependencies for docker-compose
. Are the dependencies only compatible with amd64 images?
I am not sure if the docker-compose
is compatible with arm32/64 platform. It is not mentioned on https://pypi.org/project/docker-compose
.
Maybe you can try to remove the docker-compose
dependency. The features about docker
won't be impacted.
I can try to do some tests next week on an Apple M1 computer. I will tell you if I have any news.
Another option, you can wait for a while for the next release of the Mildred App. The new version will support the SSH connection. The docker-compose
feature will not need the docker-compose package for python.
Can you add support for Portainer connection?
@dongyg
leaving out the docker-compose
dependency causes there to be an error when building the pillow
package for some reason. I've decided to wait for the next release of the app and use an SSH connection. If you'd like to, you may close this issue, or leave it open. Thanks for all the help!
@theTisch21 I remove the package pillow. I also rebuild the docker image. Now the image supports amd64, arm64, armv7. https://hub.docker.com/r/dongyg/mildred/tags. The new version App will be launched soon with SSH support.
It appears to be working great with the new image! Thanks for all the help.
Hi, I am trying to set up mildred on my raspberry pi. Running
docker-compose up
in the directory of mildred results inStarting mildred ... done Attaching to mildred mildred | standard_init_linux.go:211: exec user process caused "exec format error" mildred exited with code 1
I'm not sure what to do here, I've set permissions on the mildred directory to 777 and tried running the docker command with sudo, and running it as root. Is there something I'm doing wrong? Or is mildred not compatible with ARM processers?
Thanks! -Sam