Select to view content in your preferred language

How to get Docker Desktop to run on startup for ArcGIS Notebook Server

8573
1
04-05-2021 10:35 PM
by Anonymous User
Not applicable
2 1 8,573

In any enterprise environment, it is crucial that services are able to restart/recover automatically in the event of disruption or failure. In the example of this blog post, this would be if there is a power outage or the server reboots unexpectedly.

When your services are not able to automatically recover, this can cause long outages for your users, especially if you are not actively monitoring your underlying infrastructure.

When running ArcGIS Notebook Server on Windows, enabling this automated recovery can be a little tricky due to ArcGIS Notebook Server’s use of Docker Desktop. Docker Desktop is a desktop application that runs on your Windows OS that allows you to create and run containers. Docker Desktop needs to be run by a user and can run into various issues when the entire application including GUI is not loaded correctly. 

It is for this reason as well as other limitations why Esri recommends installing ArcGIS Notebook Server on Linux rather than Windows. 

This is not always possible in many organisations for various reasons such as support limitations, licensing and security requirements or technical expertise. For these organisations I will outline how we can set up Docker Desktop to run automatically on startup.

 

Steps to follow:

  1. If you haven’t already set up and installed ArcGIS Notebook Server and its pre-requisites please do so now. These steps can be found here
  2. Create or select a local user account you wish to use to run the Docker Desktop application.
  3. Add this local user account to the following groups; ‘Administrators‘ and ‘docker-users
  4. Open Task Scheduler and create a new task
  5. Fill in the following details on the general tab:
    • Name: ‘Provide a descriptive name that you can easily identify this task’
    • Description: ‘Describe what this task does and any other details that will assist future users such as ‘User Account’ set to run task’.
    • When running the task, use the following user account: ‘Set this to the account created in Step 2‘.
    • Ensure ‘Run whether user is logged on or not‘ is selected.
    • Ensure ‘Run with highest privileges‘ is selected.
  6. Move to ‘Triggers‘ tab and add a new trigger with the following parameters:
    • Begin the task: At startup
    • Delay task for: 5 minutes
    • Ensure ‘Enabled‘ is checked
  7. Move to the ‘Actions‘ tab and add a new action with the following parameters:
    • Action: Start a program
    • Program/script: ‘Browse to the installation location for Docker Desktop and select the ‘Docker Desktop.exe‘ application
  8. Move to the ‘Settings‘ tab and ensure the following options are selected:
    • Allow task to be run on demand
    • If the running task does not end when requested, force it to stop
  9. Select Ok to create the task.
 
 

You have now successfully set up Docker Desktop to automatically recover from unexpected server reboots and outages. It is important to note that the delay in the task is important as it allows Windows to finish startup before Docker Desktop attempts to run. If you run into issues where you cannot run containers try increasing the delay to 10-15 minutes. 

1 Comment