general03 / flask-autoindex

Generates index page like mod_autoindex
https://flask-autoindex.readthedocs.io
MIT License
112 stars 35 forks source link

Running Autoindex in Docker #51

Closed prathameshd9 closed 4 years ago

prathameshd9 commented 4 years ago

I am trying to get this up ind Docker.Pretty simple Dockerfile

FROM python:3.7.4

WORKDIR /app/
COPY . /app/

RUN pip install -r "requirements.txt"

EXPOSE 5000

ENTRYPOINT ["python", "app.py"]

And running as docker run --name autoindex -p 5000:5000 -ti javadocs -v /folderview:/app

Gives me Screen Shot 2019-11-22 at 3 57 05 PM

I have ppath="/app" in app.py . Any idea on what I might be missing ?

general03 commented 4 years ago

Hello,

can you put the app.py content, and the result of docker ps and curl 1.2.3.4:5000

Thanks

prathameshd9 commented 4 years ago

app.py

from flask import Flask 
from flask_autoindex import AutoIndex

app = Flask(__name__)

ppath = "/app"

AutoIndex(app, browse_root=ppath)    

if __name__ == "__main__":
    app.run()

$docker ps

Screen Shot 2019-11-25 at 9 52 32 AM Screen Shot 2019-11-25 at 9 50 23 AM
general03 commented 4 years ago

Hello,

Sorry for the delay, It's configuration docker issue as you can see docker exec -it javadocs curl 127.0.0.1:5000 With this command you can see the content page of Flask Autoindex

general03 commented 4 years ago