Comments (11)
I had the same issue on Docker for Windows and I fixed it with two changes:
- Add the shebang
#!/usr/bin/env python2.7
, like @davidem already wrote - Use the Unix style line endings for
app.py,
see https://stackoverflow.com/a/55272071/4471199
from example-voting-app.
Strange, I can't seem to reproduce the error on a fresh install.
from example-voting-app.
this should be started with docker stack deploy -c docker-stack.yml app
from example-voting-app.
@ProsperWare : thanks for the reply, but: I was under the impression that you can use any of the common methods to start the application (compose, stack, k8s, etc). So when I have an issue using 'docker compose', saying I need to use 'docker stack deploy' surprises me... especially when the documentation clearly states you can use either method.
Anyway: I had an issue, fixed it, thought I'd share it, but couldn't reproduce it myself on a fresh install. I'll close the case.
from example-voting-app.
I had the same issue on Docker for Windows and I fixed it with two changes:
- Add the shebang
#!/usr/bin/env python2.7
, like @davidem already wrote- Use the Unix style line endings for
app.py,
see https://stackoverflow.com/a/55272071/4471199
I'm unable to fix my setup, I've converted windows style line ending to unix style line ending, and added
#!/usr/bin/env python2.7
to the head of my app.py, but the container failed to boot with exit code 127, showing
vote_1 | * Serving Flask app "app" (lazy loading)\r
vote_1 | * Environment: production
vote_1 | WARNING: This is a development server. Do not use it in a production deployment.
vote_1 | Use a production WSGI server instead.
vote_1 | * Debug mode: on
vote_1 | * Running on http://0.0.0.0:80/ (Press CTRL+C to quit)
vote_1 | * Restarting with stat
': No such file or directoryte 'python2.7
examplevotingapp_vote_1 exited with code 127
any ideas?
from example-voting-app.
': No such file or directoryte 'python2.7
...
any ideas?
Do you have python 2.7 installed? 😎
Never mind... stupid remark... see below
from example-voting-app.
': No such file or directoryte 'python2.7
...
any ideas?Do you have python 2.7 installed? 😎
do I need to install that on the host machine?
from example-voting-app.
do I need to install that on the host machine?
No... strike my comment... I was stupid 🤭
Can you post the first few lines of app.py?
Another option: remove everything and start from scratch. Unless you've made significant changes.
from example-voting-app.
do I need to install that on the host machine?
No... strike my comment... I was stupid 🤭
Can you post the first few lines of app.py?
Another option: remove everything and start from scratch. Unless you've made significant changes.
In the Docker Quickstart Terminal
$ cat vote/app.py
#!/usr/bin/env python2.7
from flask import Flask, render_template, request, make_response, g
from redis import Redis
import os
import socket
import random
import json
I think should add the shebang and make an pull request 😏
from example-voting-app.
hmm... looks ok. Strange. And you're using the original Dockerfile to build 'vote'? I mean: it 's still using python:2.7-alpine?
from example-voting-app.
hmm... looks ok. Strange. And you're using the original Dockerfile to build 'vote'? I mean: it 's still using python:2.7-alpine?
Yes... I did not change the Dockerfile, more strangly, if I compile and build it as an single image, it runs smoothly without any warning. even with the shebang removed, I think it is an docker-compose issue.
from example-voting-app.
Related Issues (20)
- Error: result, vote, worker containers are unhealthy HOT 2
- Worker pod not able to connect to db HOT 7
- ERRO[0000]: db HOT 2
- How to run this on EKS cluster ? HOT 1
- performing replicas for each db, redis and worker. HOT 1
- Udemy
- Voting results issue
- Have a problem for run result-app in arm architecture HOT 1
- can't rebuilt the docker container of vote app HOT 1
- Docker-compose up issue. Error related to /Healthchecks HOT 1
- Cleanup Hub repo and images HOT 5
- Audit expose ports on services
- Update Docs with latest stack file example
- Improve readme to indicate official image locations
- Add .gitattributes file to this repo so that the *.sh files will always use eol=lf HOT 1
- use GHA to update Docker Hub repo description HOT 4
- Including wasm runtime into "result" service
- Worker App build error HOT 9
- votingapp_result not showing the result HOT 1
- Port 5000 is used by MacOSX Ventura 13.6.2 HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from example-voting-app.