If you wish to use the container engine maintained by the openEuler repository, install Moby and then add the docker compose plugin. Moby is the open-source upstream project of Docker Engine; after installation, you still use the docker command.
This guide uses openEuler 24.03 LTS SP3, which provides the moby package, to demonstrate installing and running a Compose project. For other versions, first verify availability using dnf info moby. If the package is not available, refer to the Docker CE repository installation or static installation. Do not assume software origin solely based on the docker command name.
1. Check Current State and Install Moby
type -a docker dockerd
rpm -q moby docker-ce docker-engine podman-docker
It’s normal for new systems to show “not installed”. If another Docker installation already exists, plan data and configuration migration first to avoid conflicts between binary files or systemd services. Proceed as a regular user with sudo privileges:
sudo dnf install moby curl
sudo systemctl enable --now docker
sudo docker version
The moby metapackage includes the engine, client, and required runtime. docker version should display both Client and Server information. The service name is docker, not moby. To check actual package versions:
rpm -q moby moby-engine moby-client containerd runc
2. Install the Compose Plugin
First, test:
sudo docker compose version
If a usable plugin is already available, skip this section. The Moby package in openEuler 24.03 LTS SP3 does not include this plugin and must be installed separately. The old docker-compose in the repository is not the same as the docker compose used here.
Download the official release file for x86_64 / aarch64 architecture, using Compose 5.5.1 as an example:
mkdir -p "$HOME/docker-install"
cd "$HOME/docker-install"
ARCH=$(uname -m)
COMPOSE_VERSION=v5.5.1
COMPOSE_FILE="docker-compose-linux-${ARCH}"
COMPOSE_BASE=https://github.com/docker/compose/releases/download
curl -fL -o "$COMPOSE_FILE" \
"${COMPOSE_BASE}/${COMPOSE_VERSION}/${COMPOSE_FILE}"
curl -fL -o "${COMPOSE_FILE}.sha256" \
"${COMPOSE_BASE}/${COMPOSE_VERSION}/${COMPOSE_FILE}.sha256"
sha256sum -c "${COMPOSE_FILE}.sha256"
sudo install -D -m 0755 "$COMPOSE_FILE" \
/usr/local/lib/docker/cli-plugins/docker-compose
sudo docker compose version
When choosing another version, verify the correct file for your architecture at Compose Releases, ensuring both the binary and checksum use the same version. See below for handling slow GitHub downloads.
3. Run a Compose Project
If you have an existing project, navigate to the directory containing compose.yaml and follow the project instructions. Alternatively, run this minimal example:
mkdir -p "$HOME/moby-demo"
cd "$HOME/moby-demo"
cat <<'EOF' > compose.yaml
services:
web:
image: nginx:stable
ports:
- "127.0.0.1:8080:80"
restart: unless-stopped
EOF
sudo docker compose up -d
sudo docker compose ps
curl -f http://127.0.0.1:8080/
After the container runs and returns the Nginx welcome page, the installation is complete. If image pull times out, see the download instructions below and retry docker compose up -d.
Port 8080 listens only on the Docker host itself; curl should be executed from the same machine. Compose automatically creates a project network. restart: unless-stopped ensures containers restart with Docker unless manually stopped, so no additional background service is needed for Compose.
When no longer needed, run sudo docker compose down in the project directory. You can later verify recovery during maintenance without immediately restarting the entire machine.
Common Requirements and Issues
Container Shows Up but Service Is Unreachable
Run sudo docker compose logs --tail=50 web in the project directory to check if the application has started. “Up” only means the container process is running, not that the application is ready. For example, some Alpine-based Nginx images may access the Alpine repository during startup scripts, which is unaffected by Docker Hub mirror settings. This guide uses the Debian-based nginx:stable image.
Slow or Failed Compose Download
The download is from GitHub and unrelated to Docker Hub container images. If using an HTTP proxy, set the proxy in the terminal before running curl:
export http_proxy=http://127.0.0.1:7890
export https_proxy=http://127.0.0.1:7890
If accessing via SSH, 127.0.0.1 refers to the server itself. Alternatively, use a trusted GitHub URL prefix acceleration service. For example, change the download base to:
COMPOSE_BASE=https://gh-proxy.com/https://github.com/docker/compose/releases/download
Then re-run the two curl commands, verification, and installation. Both binary and .sha256 files must be downloaded. Acceleration services are third-party and not HTTP proxies—do not set them in https_proxy.
Slow or Failed Docker Hub Image Pull
docker pull and Compose plugin downloads are separate. Configure a trusted Docker Hub mirror in /etc/docker/daemon.json, for example:
{
"registry-mirrors": ["https://docker.1ms.run"]
}
Create the directory if missing: sudo install -d -m 0755 /etc/docker. Edit the file with sudoedit /etc/docker/daemon.json. If the file exists, merge the registry-mirrors field. After verification, apply the change during a safe service restart:
sudo dockerd --validate --config-file=/etc/docker/daemon.json
sudo systemctl restart docker
sudo docker info --format '{{json .RegistryConfig.Mirrors}}'
This setting primarily accelerates Docker Hub and does not affect GitHub or other registries. Public mirror services may have different access conditions and sync scopes. If the selected service remains slow, consider switching to https://docker.m.daocloud.io as described in DaoCloud’s guide. See Registry mirror documentation.
To route image pulls through an existing HTTP proxy, configure the dockerd service, not just terminal environment variables. Run sudo systemctl edit docker and add:
[Service]
Environment="HTTP_PROXY=http://127.0.0.1:7890"
Environment="HTTPS_PROXY=http://127.0.0.1:7890"
Environment="NO_PROXY=localhost,127.0.0.1,::1"
Replace the proxy address with one reachable by the Docker host. Then run sudo systemctl daemon-reload and sudo systemctl restart docker, and retry the pull. Use sudo systemctl show --property=Environment docker to verify settings. If daemon.json already contains proxies, it takes precedence—adjust the original configuration instead. See daemon proxy documentation.
Service Startup Fails or Duplicate Configuration Error After Adding Logging
Check logs:
sudo journalctl -b -u docker --no-pager -n 100
systemctl cat docker
This version of openEuler Moby defaults to --log-driver=journald, --live-restore, and other options via /etc/sysconfig/docker. Do not add "log-driver": "local" from other tutorials into daemon.json—having the same option in both command line and config can cause dockerd to fail. When modifying, first check existing settings and ensure the option is defined in only one place.
This guide only adds mirror addresses while preserving the distribution’s original service settings. Do not replace the RPM-provided docker.service with a static version.
Use Docker Without sudo
sudo usermod -aG docker "$USER"
Log out and back in for changes to take effect. Members of the docker group have root-equivalent privileges—only add trusted users. You can still use sudo docker without joining the group. See Docker permission documentation.
How to Update
Update the engine and distribution runtime via DNF:
sudo dnf upgrade moby moby-engine moby-client containerd runc libnetwork
Review the transaction and update notes, then schedule service restarts according to your maintenance plan. Manually installed Compose will not be updated by DNF—download and replace the plugin manually for new versions.
If switching to Docker CE, follow the migration steps in the repository installation guide for packages, runtime data, and service parameters—do not treat it as a simple version update.
Verification: The installation method has been tested on openEuler 24.03 LTS SP3 (x86_64 / aarch64) with Moby, Compose, and reboot validation. This update was re-verified on x86_64 with Moby 25.0.3-48, Compose 5.5.1, and the streamlined process. Revision date: 2026-09-20