ParrotPrediction / docker-course-xgboost

Materials for an online-course - "Practical XGBoost in Python"
http://education.parrotprediction.teachable.com/courses/practical-xgboost-in-python
217 stars 136 forks source link

Docker behind Firewall / Build container on Docker for Windows #1

Open mcd0well opened 8 years ago

mcd0well commented 8 years ago

I have encountered some small issues in trying to fire up the docker container from the GitHub repo. I am relatively new to docker, so I am suggesting that either some additional instruction could be added to the README or this issue can exist for other people like me who dont really know what they're doing.

1) On the most recent Docker for Windows (running on W10) I couldn't get docker-compose up to work. Alternatively I used docker build -t xgboost-course . to get the docker image.

2) Docker build fails for me due to some proxy issues (it spits out 101 network unreachable and failed to fetch ... errors when trying to use apt-get. To fix this - add a line to the Dockerfile to ensure docker has the right proxy settings:

USER root

ENV http_proxy http://hostname:port
ENV https_proxy http://hostname:port

# libav-tools for matplotlib anim
    ...

I believe the problems were because the proxy settings exposed to the docker containers did not have a leading http://.

3) When docker builds successfully you cant then start the container in daemon mode through docker run -d -p 8888:8888 -v $PWD/notebooks:/home/joyvan/work xgboost-course

mcd0well commented 8 years ago

Upon further reading the answer provided here looks like a better approach than to explicitly put proxy details into the Dockerfile