Skip to main content

Docker FAQs

Installation & Setup

How do I confirm that Docker is running?

Open a Command Line (CMD) and type:

docker version

Install-Docker-FAQ-Q1

You can also type this in the Command Line:

docker run hello-world

Install-Docker-FAQ-Q1b

What does it mean that Docker daemon is not running?

The message "Docker: error during connect: Post… This error may also indicate that docker daemon is not running" means that Docker is not running in your system. You will first have to start Docker. Please go to Step 1 on How to Install Docker.

Install-Docker-FAQ-Q2

After you successfully install and Docker is running, you will get the following message:

Install-Docker-FAQ-Q2b

I have a Virtual Box installed on my system. Since I installed Docker, I cannot execute any of my virtual machines anymore. Why?

Be aware that enabling Docker in your system will prevent you from using Virtual Box. When Hyper-V technology is enabled, it interferes with Virtual Box. More information about this in docs.docker.com/docker-for-windows/install

Is my Virtual Box lost?

No. Your Virtual Box is not lost. You just cannot execute a virtual machine once you have Docker on.

How to run Docker without sudo on Linux?

By default, Docker on Linux is configured to require root privileges. That means you'll need to prefix most Docker commands with sudo:

sudo docker run ...

If you're using Docker frequently, typing sudo every time can be inconvenient. The official Docker documentation provides a way to safely allow non-root users to run Docker by adding them to the docker group.

➡️ Manage Docker as a non-root user

After these steps, you'll be able to use Docker without needing to prefix commands with sudo.

Troubleshooting

What should I do with a "License file not found" error?

Make sure you have replaced the TOKEN with your API Token in the run command. Refer to Manual Installation Steps.

What is a "connection refused" error when I am trying to upload images with curl?

You are probably receiving this message because the container is not running. To verify that type docker ps in the Command Line (CMD) in the terminal to see the status of containers. It should look like this (1 container running in port 8080):

Install-Docker-FAQ-Q6

If the status does not show any containers at all, then the SDK container is not running in your system. You need to first run it. Refer to Manual Installation Steps.

What does "you have a container running with this license" mean?

Install-Docker-FAQ-Q9

This means that you currently have a container running with this license, perhaps on another machine. If you need to install the SDK on another machine, please uninstall this one first. Refer to Uninstall Steps to uninstall the SDK. Or, go app.platerecognizer.com/service/snapshot-cloud to add another license for this machine.

Install-Docker-FAQ-Q9b

How do I resolve this error message: ERROR:root:Local system time may be out of sync?

Make sure that the time and date of your Docker host is set correctly. On Windows, Check this tip for some solutions to fix the issue.

Container Management

How do I check how disk usage by Docker?

To check how much disk space Docker is using, open your Command Prompt (CMD) or terminal and run:

docker system df

Install-Docker-FAQ-Q5

info

Use docker system df -v for a more detailed breakdown.

How can I check if the SDK container is running correctly?

To verify that the SDK container is running properly, open your Command Prompt (CMD) or terminal and run:

docker ps

This command will list all active (running) containers. Look for your SDK container in the list to confirm that it is up and running.

Install-Docker-FAQ-Q6

info

If you don’t see the container listed, try docker ps -a to check if it exited or failed to start.

How do I change the port of the container?

If the default port (e.g., 8080) is already in use on your machine, you can change the host port when starting the container using the -p option.

docker run -t -v license:/license -e TOKEN=YOUR_API_TOKEN -p HOST_PORT:CONTAINER_PORT platerecognizer/alpr

Port Mapping Explained

  • HOST_PORT is the port on your computer (the one you’ll use to access the app).
  • CONTAINER_PORT is the port inside the container that the app is listening on.

Example:

docker run -t -v license:/license -e TOKEN=YOUR_API_TOKEN -p 3000:8080 platerecognizer/alpr

In this example:

  • You can access the app on http://localhost:3000.
  • The app inside the container is still running on port 8080.

Why does Docker on Windows on a Dual CPU setup only utilize half the logical cores?

It appears that there is an issue with Docker on windows not being able to take advantage of both NUMA nodes properly. Recommendation: switching the OS to a Linux distro should resolve the issue.

Performance & Monitoring

What are some good Docker monitoring tools?

To monitor Docker, you can use Prometheus, an open source software. You can see a comparison of different monitoring tools for Docker. Docker also provides these built in commands:

  1. docker ps - List running containers
  2. docker stats - Display a live stream of container(s) resource usage statistics
  3. docker inspect - Return low-level information on Docker objects

Licensing & Updates

How can I upgrade my containers automatically when a new release is available?

You can set Watchtower as a supervisor; this tool automatically monitors and updates specific Docker containers when a new image version is available.

It consists of a container that interacts with Docker API to pull the newest image from the repository then applies the upgrade.

caution

This action implies restarting the container.

🐳 Docker Command

docker run -d --name watchtower -v /var/run/docker.sock:/var/run/docker.sock containrrr/watchtower --interval 28800 stream

Command Structure

OptionDescription
-dRun container in detached mode.
--name watchtowerName the container "watchtower".
-v /var/run/docker.sock:/var/run/docker.sockMount the Docker socket so Watchtower can interact with the Docker daemon (For Windows, use double slash (//) at the beginning of the path.)
containrrr/watchtowerThe official Watchtower image.
--interval <int> (optional)Check for image updates every 28800 seconds (8 Hours). Adjust as needed for production (e.g., 300 for every 5 minutes).
stream (optional, recommended)Specify the containers you want Watchtower to monitor, separated by space (e.g., stream snapshot monitors running stream and snapshot container image.). To monitor all containers, omit the container name.
info

If you need to be more specific about the day/time to check for the images, you can use the parameter --schedule, which uses a Cron expression in 6 fields. It defines when and how often to check for new images (e.g., 0 0 0 * * * Run once a day, midnight). Simulate a specific schedule at Cron simulator > --schedule or --interval can be used, but not both at the same time.

info

Activity Verification

To check that Watchtower is running correctly:

docker logs -f watchtower

You should see logs showing periodic checks and any update actions taken. e.g.:

Terminal logs output:

2025-04-11 19:12:45 time="2025-04-11T22:12:45Z" level=info msg="Watchtower 1.7.1"
2025-04-11 19:12:45 time="2025-04-11T22:12:45Z" level=info msg="Using no notifications"
2025-04-11 19:12:45 time="2025-04-11T22:12:45Z" level=info msg="Only checking containers which name matches \"stream\" or \"snapshot\""
2025-04-11 19:12:45 time="2025-04-11T22:12:45Z" level=info msg="Scheduling first run: 2025-04-11 22:12:55 +0000 UTC"
2025-04-11 19:12:45 time="2025-04-11T22:12:45Z" level=info msg="Note that the first check will be performed in 9 seconds"
2025-04-11 19:12:56 time="2025-04-11T22:12:56Z" level=info msg="Session done" Failed=0 Scanned=1 Updated=0 notify=no
2025-04-11 19:13:06 time="2025-04-11T22:13:06Z" level=info msg="Session done" Failed=0 Scanned=1 Updated=0 notify=no
2025-04-11 19:13:16 time="2025-04-11T22:13:16Z" level=info msg="Session done" Failed=0 Scanned=1 Updated=0 notify=no
2025-04-11 19:13:42 time="2025-04-11T22:13:42Z" level=info msg="Found new platerecognizer/alpr:latest image (dbeb8a49c0aa)"
2025-04-11 19:13:42 time="2025-04-11T22:13:42Z" level=info msg="Stopping /snapshot (8c6e223d8c78) with SIGTERM"
2025-04-11 19:13:44 time="2025-04-11T22:13:44Z" level=info msg="Creating /snapshot"
2025-04-11 19:13:45 time="2025-04-11T22:13:45Z" level=info msg="Session done" Failed=0 Scanned=2 Updated=1 notify=no
Floating button icon
CTRL + .