Site icon ExaGridDba

Docker on Windows 10 Home

By Brian Fitzgerald

Introduction

This article describes how you can configure your Windows 10 Home to run docker. The approach is:

Download Docker

Buy the upgrade to Windows 10 Pro

Upgrade

Enable Hyper-V

Enable Virtualization

Start Docker Service

If prompted, start docker service.

Notes on creating a docker image

Make sure that your application inside the docker image binds to host 0.0.0.0, not 127.0.0.1. For example, if you are using flask, then your Dockerfile contains:

ENTRYPOINT [ "flask" ]
CMD [ "run", "--host=0.0.0.0" ]

Example docker image creation:

docker build -t flask-tutorial .

Notes on running a docker image

If you are testing and want to be able to interrupt docker, use the -i and -t flags:

C:\Users\Brian Fitzgerald>docker run -p 5000:5000 -i -t flask-tutorial
* Serving Flask app "flaskr"
* Environment: production
WARNING: This is a development server. Do not use it in a production deployment.
Use a production WSGI server instead.
* Debug mode: off
* Running on http://0.0.0.0:5000/ (Press CTRL+C to quit)
^C

Connect to the application at

http://127.0.0.1:5000/

 

Conclusion

With modifications, you can run Docker on your home PC.

Exit mobile version