Configuring AMP to use Docker for instances

AMP allows you to deploy individual instances inside containers in order to isolate them from the host.

Note that ampinstmgr and ADS based instances cannot be run inside containers, as they need the ability to create them.

Linux

  1. From SSH/Terminal run sudo su -l
  2. Run bash <(wget -qO- getamp.sh) installDocker
  3. Reboot Linux
    4.Login to the AMP panel and navigate to Configuration -> New Instance Defaults and enable “Create in Docker Containers”
  4. Create your first Docker instance!

Note: AMP may require you to manually add the amp user to the docker group. If so, it will prompt that you run this command usermod -a -G docker amp as root.

Windows

NOTE:

  • The below instructions are for Windows 10 and 11. Docker Desktop is not officially supported by Docker on Windows Server.
  • Also, only Linux Docker images exist for AMP, and so Docker Desktop runs AMP in Docker using WSL2.
  1. Install Docker Desktop using the Install Guide
  2. Open the start menu and type compmgmt.msc to open Computer Management
  3. Expand “Local Users and Groups” and select Groups
  4. Double-click docker-usersand click Add
  5. In the “Enter the object names to select” section type NETWORK SERVICE
  6. Click OK to close out of all windows
  7. Reboot Windows
  8. Login to the AMP panel and navigate to Configuration -> Instance Deployment -> Networking and disable “Use Host Networking for new Containers”
  9. On the same page change the “Default AMP IP Binding” to 0.0.0.0
  10. Navigate to Configuration -> Instance Deployment -> Deployment Defaults and enable “Create in Docker Containers”
  11. On the same page set the “Default Auth Server” to be http://host.docker.internal:8080 (assuming ADS is on port 8080)
  12. Create your first Docker instance!

Now instances created via ADS will be created inside containers automatically. No additional configuration is required.

You can also use the --docker flag when creating instances via ampinstmgr. E.g. ampinstmgr --docker create rust

Note that existing instances cannot be converted on Windows to run in Docker.

2 Likes