Oh, I see. “up” doesn’t mean “update”. It just “brings up” the project which can include building a new Docker image, creating and starting the container with or without mounted volumes.
If it is slow, the question is what kind of Docker you use, on what platform and how you installed it. Is it Docker Desktop or Docker CE? Is it installed on Linux, Windows or macOS. What the CPU architecture is and whether you needed to emulate a different architetcure or not. If it needs to pull the image, that could also take time, at least the first time. Please share the above details. The output of the below comands could help if you are not sure.
docker info
docker version
Also share the link to the documentation you followed to install Docker.
I have the impression that it’s slow (if not impossible) at certain times, at random. Yet all the other sites/services on my network are working perfectly, only Docker is causing problems.
docker version :
Client: Docker Engine - Community
Version: 25.0.3
API version: 1.44
Go version: go1.21.6
Git commit: 4debf41
Built: Tue Feb 6 21:14:22 2024
OS/Arch: linux/arm64
Context: default
Server: Docker Engine - Community
Engine:
Version: 25.0.3
API version: 1.44 (minimum version 1.24)
Go version: go1.21.6
Git commit: f417435
Built: Tue Feb 6 21:14:22 2024
OS/Arch: linux/arm64
Experimental: false
containerd:
Version: 1.6.28
GitCommit: ae07eda36dd25f8a1b98dfbf587313b99c0190bb
runc:
Version: 1.1.12
GitCommit: v1.1.12-0-g51d5e94
docker-init:
Version: 0.19.0
GitCommit: de40ad0
So the slow part is downloading the image and not running the container. That could be a network issue between you and Docker Hub or any problem with Docker Hub itself sometimes.
You can also try downloading images from other registries. If that is always faster, the problem is probably not on your machine. Then you can try to download other images. from Docker Hub. If that is always faster, something could be with the storage on which the layers of the image are. You can try speedtests like Ookla and trace your network packets, but recognizing the issue is usually not easy, especially for someone who is not familiar with networks. You can still search for tcpdump and tshark or wireshark if you have GUI. There is no one solution for all cases and I’m not good enough to guide you through online when it would take a long time to me as well to find the cause in person. If you are trying to use Docker at work, you can also ask the system administrators if they exist.