Giter Site home page Giter Site logo

Comments (11)

robeatoz avatar robeatoz commented on May 22, 2024 2

I had the same issue on Docker for Windows and I fixed it with two changes:

from example-voting-app.

davidem avatar davidem commented on May 22, 2024

Strange, I can't seem to reproduce the error on a fresh install.

from example-voting-app.

ProsperWare avatar ProsperWare commented on May 22, 2024

this should be started with docker stack deploy -c docker-stack.yml app

from example-voting-app.

davidem avatar davidem commented on May 22, 2024

@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.

wusatosi avatar wusatosi commented on May 22, 2024

I had the same issue on Docker for Windows and I fixed it with two changes:

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.

davidem avatar davidem commented on May 22, 2024

': 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.

wusatosi avatar wusatosi commented on May 22, 2024

': 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.

davidem avatar davidem commented on May 22, 2024

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.

wusatosi avatar wusatosi commented on May 22, 2024

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.

davidem avatar davidem commented on May 22, 2024

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.

wusatosi avatar wusatosi commented on May 22, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.