- 06
May - 2018Analytics
2 min | 37943Docker is a technology that emerges for about 5 years and simplifies the packaging, distribution, installation and execution of (complex) applications. Portainer is a management UI which allows you to easily manage your different Docker environments. If you are here because of the post title, I do not have to explain anymore about the Docker technology and the management tool Portainer. But, if you need to know more about these two topics, I leave you two links:
Let's start with the installation of Portainer for Docker management on Windows 10 (running on a Linux Container).
Installation on Windows 10
- Open the Docker Menu on the right side of the Windows Taskbar and go to Settings (3rd. Option).As you can see from the sixth option, I am running Docker using Linux Container (I recommend this type of containers)! For native Windows containers, check the last section of this post.
- On the Tab general, activate the option Expose daemon on
tcp://localhost:2375
without TLS (last Option). - Then, open a PowerShell with administrator rights and type the following:
netsh interface portproxy add v4tov4 listenaddress=10.0.75.1 listenport=2375 connectaddress=127.0.0.1 connectport=2375 netsh advfirewall firewall add rule name="docker management" dir=in action=allow protocol=TCP localport=2375
The first line connects
10.0.75.1:2375
to the daemon socket on127.0.0.1:2375
, and the second line adds a pass-through on the firewall for the port 2375 (*) . You need to know that this makes yourself vulnerable to remote code execution attacks. - Then, start the Portainer container using an user-mode PowerShell (you do not need administrator rights to do this) typing:
docker run -d -p 9000:9000 -v portainer_data:/data portainer/portainer-ce -H tcp://10.0.75.1:2375
- Go to your browser and type
http://localhost:9000
and configure your admin user and password if needed.
Update 2020.11:portainer/portainer
is the home of Portainer v1.24.x, and is now deprecated; all new releases for Portainer 2.0 will be published inportainer/portainer-ce
.Note (*): Ports 2375 (unencrypted) and 2376 (encrypted with TLS) are the standard ports. You will obviously want to use TLS in a production environment, but the Windows Docker package does not include the tools to do this. Standard Windows certificates can't be used. Instead you will need to follow the documentation to create OpenSSL certificates. That's all you need to run Portainer on Windows to manage Docker. If you need to know more about Portainer, just read its documentation.
Extra options
I wrote a new post with extra options for Portainer.
Native Windows container
To run portainer container in a native Windows container, the syntax is:
docker run -d -p 9000:9000 --name portainer --restart always -v \\.\pipe\docker_engine:\\.\pipe\docker_engine -v C:\ProgramData\Portainer:C:\data portainer/portainer-ce
For more info, check this link.
- Open the Docker Menu on the right side of the Windows Taskbar and go to Settings (3rd. Option).
We use cookies to improve our services. Read more about how we use cookies and how you can refuse them.
Tanyo Ivanov 11.07.2018
Thank you a lot!
vijay 03.01.2019
Excellent - got mine running in few minutes after spending few hours fixing it myself
r 05.05.2020
And I still can't get it to work. Jesus christ, why is this such a pain in the ass? I give up, I'll stick to RDP for managing my server I guess if it's going to be this f[...] hard