example-voting-app does not build.
roybooth opened this issue · 2 comments
Expected behavior
Example Voting Application builds
Actual behavior
gunicorn fails to build due to wrong Python version
Information
Happens every time I run command docker-compose up build
Windows cmd shell output :
Digest: sha256:a9d3631c5062a6759362dafae7192041f6c10d83a9632daaab02024ccdae906d
Status: Downloaded newer image for python:2.7-alpine
---> 037e005d160a
Step 2/7 : WORKDIR /app
---> Running in ede6879fb612
Removing intermediate container ede6879fb612
---> da7ff38fe0be
Step 3/7 : ADD requirements.txt /app/requirements.txt
---> ee7218f8b456
Step 4/7 : RUN pip install -r requirements.txt
---> Running in a692c0566ff4
DEPRECATION: Python 2.7 reached the end of its life on January 1st, 2020. Please upgrade your Python as Python 2.7 is no longer maintained. A future version of pip will drop support for Python 2.7. More details about Python 2 support in pip, can be found at https://pip.pypa.io/en/latest/development/release-process/#python-2-support
Collecting Flask
Downloading Flask-1.1.1-py2.py3-none-any.whl (94 kB)
Collecting Redis
Downloading redis-3.4.1-py2.py3-none-any.whl (71 kB)
Collecting gunicorn
Downloading gunicorn-20.0.4-py2.py3-none-any.whl (77 kB)
ERROR: Package 'gunicorn' requires a different Python: 2.7.17 not in '>=3.4'
ERROR: Service 'vote' failed to build: The command '/bin/sh -c pip install -r requirements.txt' returned a non-zero code: 1
===========================================================
Windows 10 pro
Docker 19.03.8, build afacb8b
running on native intel i7 hardware
Steps to reproduce the behavior
follow instructions on https://docs.docker.com/docker-for-windows/dashboard/
at step https://docs.docker.com/docker-for-windows/dashboard/#explore-running-containers-and-applications
follow link to the Example voting app, take you to git, select clone or download,
select download zip, extract to a folder on local disk
To start the application, navigate to the directory containing the example voting application in the CLI and run docker-compose up --build.
Console output for build shown above.
The same question, step by step according the user manuals , the console shows below:
C:\develop\docker\example-voting-app-master>docker-compose up --build
Building vote
Step 1/7 : FROM python:2.7-alpine
---> 8579e446340f
Step 2/7 : WORKDIR /app
---> Using cache
---> cd10e61be2db
Step 3/7 : ADD requirements.txt /app/requirements.txt
---> Using cache
---> a8af10a526b6
Step 4/7 : RUN pip install -r requirements.txt
---> Using cache
---> 0c6b261ce959
Step 5/7 : ADD . /app
---> Using cache
---> 2af7f51c5fef
Step 6/7 : EXPOSE 80
---> Using cache
---> 341279baa0eb
Step 7/7 : CMD ["gunicorn", "app:app", "-b", "0.0.0.0:80", "--log-file", "-", "--access-logfile", "-", "--workers", "4", "--keep-alive", "0"]
---> Using cache
---> e7db9b4c775c
Successfully built e7db9b4c775c
Successfully tagged example-voting-app-master_vote:latest
Building result
Step 1/9 : FROM node:10-slim
---> 0c607c3a0390
Step 2/9 : WORKDIR /app
---> Using cache
---> a10af929b619
Step 3/9 : RUN npm install -g nodemon
---> Using cache
---> 031a3f0bb6e2
Step 4/9 : COPY package*.json ./
---> Using cache
---> e44014290bf2
Step 5/9 : RUN npm ci && npm cache clean --force && mv /app/node_modules /node_modules
---> Using cache
---> 3e83cdb25736
Step 6/9 : COPY . .
---> Using cache
---> b3f3c9fa6f1f
Step 7/9 : ENV PORT 80
---> Using cache
---> 06759464ea04
Step 8/9 : EXPOSE 80
---> Using cache
---> 0dfb31e37738
Step 9/9 : CMD ["node", "server.js"]
---> Using cache
---> b788fc48714b
Successfully built b788fc48714b
Successfully tagged example-voting-app-master_result:latest
Building worker
Step 1/5 : FROM microsoft/dotnet:2.0.0-sdk
---> fde8197d13f4
Step 2/5 : WORKDIR /code
---> Using cache
---> ab61bf8e0363
Step 3/5 : ADD src/Worker /code/src/Worker
---> Using cache
---> 61b67c40d26c
Step 4/5 : RUN dotnet restore -v minimal src/Worker && dotnet publish -c Release -o "./" "src/Worker/"
---> Using cache
---> 47c6619aa04a
Step 5/5 : CMD dotnet src/Worker/Worker.dll
---> Using cache
---> 535814704cf7
Successfully built 535814704cf7
Successfully tagged example-voting-app-master_worker:latest
redis is up-to-date
example-voting-app-master_result_1 is up-to-date
db is up-to-date
example-voting-app-master_worker_1 is up-to-date
Creating example-voting-app-master_vote_1 ... error
ERROR: for example-voting-app-master_vote_1 Cannot create container for service vote: status code not OK but 500: {"Message":"Unhandled exception: Drive sharing failed for an unknown reason"}
ERROR: for vote Cannot create container for service vote: status code not OK but 500: {"Message":"Unhandled exception: Drive sharing failed for an unknown reason"}
ERROR: Encountered errors while bringing up the project.
Hello all! I'm going to go ahead and close this issue now that it's 2+ years old and we've been fixing a lot of issues. If it's still an issue, feel free to open a new issue and we'll gladly investigate. Apologies that it's taken so long to respond to you!