-
Notifications
You must be signed in to change notification settings - Fork 10
Tips & Tricks
PrtgDocker enables sysadmins that may not have any experience with Docker to containerize their PRTG systems without necessarily having to worry about understanding the basics of the Docker CLI. A side effect of this however is that a. when something goes wrong, you have no idea what to do, which ties in with b. Docker for Windows has a lot of problems that don't exist on other platforms (which ties in with the above)
By default PrtgDocker sets the restart policy of PRTG docker containers to --restart always
. This has been confirmed to work on both Server 2016 and Server 2019. In some cases however the policy will fail to work if you've installed something on your system that messed with the default networking (potentially Hyper-V?). In this case you will need to either identify and resolve the direct cause of the issue, configure automatic startup for your containers via the use of a Scheduled Task that executes a startup script (docker start <name>
) or build a new server that does not have this issue
While PrtgDocker makes it easy to create PRTG images and containers without requiring any existing Docker CLI knowledge, once the images have been deployed you're on your own to manage your containers.
The following lists some common commands that you should be aware of when attempting to use Docker
-
docker image ls
: List all images on your system -
docker rm <repoAndTagOrId>
: Removes the container with the specified repository and tag or ID
-
docker container ls
: List all running containers on your system -
docker container ls -a
: List all containers on your system -
docker start <nameOrId>
: Starts the container with the specified name or ID -
docker stop <nameOrId>
: Stops the container with the specified name or ID -
docker rm <nameOrId>
: Removes the container with the specified name or ID -
docker <command> (docker container ls -q)
: Performs a command for all running containers on your system -
docker <command> (docker container ls -qa)
: Performs a command for all containers on your system -
docker inspect <nameOrId>
: inspects the configuration of the container with the specified name or ID
-
docker exec -it <nameOrId> powershell
: Opens a PowerShell prompt inside of a running container with a specified name or ID