|
How to Start Docker Daemon as a Windows Service with AlwaysUp |
Automatically launch Docker Daemon as soon as your Server boots and keep it running 24/7 in the background. No need to log on!
Docker automates the deployment of applications inside software containers.
Docker Daemon, an important component designed to run in the background, manages those containers using the Docker Remote API.
To install Docker Daemon as a Windows Service:
-
If necessary, download and install Docker for Windows. We have installed
Docker Toolbox for this tutorial but all you need is the Docker executable.
Note @ 12/27/2015: According to the code,
Docker Daemon requires Windows Server 2016 Technical Preview 4, build 10586 or later.
-
Download and install AlwaysUp, if necessary.
-
Start AlwaysUp.
-
Select Application > Add to open the Add Application window:
-
On the General tab:
-
In the Application field, enter the full path to the Docker executable, Docker.exe. Since we have installed Docker Toolbox in the default location, we will enter:
C:\Program Files\Docker Toolbox\Docker.exe
-
In the Arguments field, enter the parameters to run Docker in daemon mode. The first parameter must be "daemon" and it should be followed by
whatever other flags you wish to use for your environment.
We will specify the debug flag (--debug) as Docker on Windows is still young.
-
In the Name field, enter the name that you will call the application in AlwaysUp.
We have used Docker Daemon but you can specify almost anything you like.
Note @ 1/25/2019: The Docker command line tools have changed. You should run Dockerd.exe, instead of Docker.exe, and drop the "daemon" parameter.
Please see the current dockerd command line reference to
compose the flags that make sense for your situation.
-
Click over to the Startup tab and check the Ensure that the Windows Networking components have started box.
This informs AlwaysUp that Docker needs the TCP/IP networking stack to operate.
-
Next, switch to the Extras tab. If you wish to capture the output written to the Docker console, check the Capture output to this log file box and enter the full path to the text
file that will record the output.
We also recommend checking the Automatically trim... option below to prevent the file from growing too large.
-
Click the Save button. In a couple of seconds, an entry called Docker Daemon (or whatever you called it) will show up in the AlwaysUp window.
It is not yet running though.
-
To start Docker in daemon mode, choose Application > Start "Docker Daemon". The state should transition to "Running" after a few seconds and Docker Daemon should be accessible over the remote bridge.
-
That's it! Next time your computer boots, Docker Daemon will start up immediately, before anyone logs on.
We encourage you to edit the Docker entry in AlwaysUp and check out the many other settings that may be appropriate for your environment.
For example, send an email if Docker stops, run a customized failure detection script, and much more.
Docker Daemon not working properly as a Windows Service?
-
Visit the AlwaysUp Troubleshooter - our online tool that can help you resolve the most common problems encountered when
running an application as a windows service.
-
From AlwaysUp, select Application > Report Activity > Today... to bring up a HTML report detailing the interaction between AlwaysUp and your application.
The AlwaysUp Event Log Messages page explains the more obscure messages.
- Review the AlwaysUp FAQ for answers to commonly asked questions and troubleshooting tips.
- Contact us and we will be happy to help!
|
Over 84,000 installations, and counting!
|
 |
|
Rock-solid for the past 15+ years!
|
Fully Compatible with 140+ Applications...
|