You need to enable JavaScript to run this app.
优惠活动
大模型
产品
解决方案
定价
更多

Ubuntu 16.04.4 LTS安装Docker CE失败:docker.service启动报错

Fixing Docker CE Startup Failure on Ubuntu 16.04.4 LTS

Hey there, I’ve run into this exact issue a few times when setting up Docker on older Ubuntu releases—let’s walk through how to diagnose and fix it step by step.

First, let’s get to the root of the problem by checking the detailed error logs, since the initial message only tells us the service failed without specifics.

Step 1: Grab Detailed Error Information

Run these commands to see exactly why Docker won’t start:

  • Check the Docker service status for immediate clues:
    sudo systemctl status docker.service
    
    This will show you the last few lines of the service’s output, like missing dependencies or configuration errors.
  • Dig deeper into system logs for more context:
    sudo journalctl -xe | grep docker
    
    This filters the system journal to only show Docker-related entries, which often reveal issues like storage driver conflicts or port clashes.

Step 2: Try Common Fixes Based on Typical Issues

Fix 1: Resolve Storage Driver Problems

Ubuntu 16.04 sometimes has issues with the default aufs storage driver. Here’s how to fix that:

  1. Check if the aufs kernel module is loaded:
    lsmod | grep aufs
    
  2. If you don’t see any output, load the module manually:
    sudo modprobe aufs
    
  3. Restart Docker to test:
    sudo systemctl restart docker
    

If aufs still causes trouble, switch to the overlay2 driver (more stable for most setups):

  1. Create or edit the Docker daemon config file:
    sudo nano /etc/docker/daemon.json
    
  2. Add this content:
    {
      "storage-driver": "overlay2"
    }
    
  3. Save the file (Ctrl+O, Enter, then Ctrl+X), then restart Docker:
    sudo systemctl restart docker
    

Fix 2: Reinstall Docker with Full Dependencies

Sometimes the installation skips or corrupts dependencies. Reinstalling can fix this:

sudo apt-get install --reinstall docker-ce docker-ce-cli containerd.io

After reinstalling, try starting the service again:

sudo systemctl start docker

Fix 3: Clear Old Docker Residues

If you had a previous Docker installation (even a partial one), leftover files can break the new setup. Clean everything up and start fresh:

  1. Purge existing Docker packages:
    sudo apt-get purge docker-ce docker-ce-cli containerd.io
    
  2. Delete all Docker data and config directories:
    sudo rm -rf /var/lib/docker
    sudo rm -rf /etc/docker
    
  3. Reinstall Docker CE:
    sudo apt-get install docker-ce
    

Fix 4: Check for Port Conflicts

Docker uses port 2375 (unencrypted) or 2376 (encrypted) by default. If another service is using these ports, Docker won’t start. Check for conflicts with:

sudo ss -tulpn | grep docker

If you see another process using the port, stop that service or modify Docker’s port configuration in /etc/docker/daemon.json.

Step 3: Verify the Fix

Once you’ve tried a fix, test if Docker works properly:

  1. Start the service (if not already running):
    sudo systemctl start docker
    
  2. Check the service status to confirm it’s active:
    sudo systemctl status docker.service
    
  3. Run the hello-world container to ensure everything is functioning:
    sudo docker run hello-world
    

If you still run into issues, share the output from the systemctl status and journalctl commands—those details will help narrow down the problem further.

内容的提问来源于stack exchange,提问作者Nico Schuck

相关产品推荐
方舟 Agent Plan

超全模态模型 × Harness 升级,最新支持 Deepseek-V4.1-Flash、GLM-5.3 系列、Doubao-Seedream-5.0-pro、Kimi-K3 (部分), 限时 9.9 元起

最近更新时间:2026.05.27 03:55:53