Skip to content

Instantly share code, notes, and snippets.

@KEINOS
Last active March 9, 2023 10:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save KEINOS/917fa037d8d5f886c8406ad622dc8c23 to your computer and use it in GitHub Desktop.
Save KEINOS/917fa037d8d5f886c8406ad622dc8c23 to your computer and use it in GitHub Desktop.
[Docker] [Alpine] 5 things you should try if the container fails to boot

5 things you should try if the container fails to boot

  1. Reboot the service.

    sudo systemctl restart docker.service
  2. Try "hello-world".

    docker pull "hello-world"
    docker run --rm hello-world
  3. Check time stamp of the host.

    date
  4. Check ntp (time sync) of the container.

    docker run --rm alpine date

    If not synced, try.

    docker run --rm --privileged alpine date
    docker run --rm --privileged alpine apk update
    
  5. Try other network.

    docker run --rm --network=host alpine apk update

Error examples

$ docker run --rm alpine apk update
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/main/armhf/APKINDEX.tar.gz
ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.17/main: temporary error (try again later)
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.17/main: No such file or directory
fetch https://dl-cdn.alpinelinux.org/alpine/v3.17/community/armhf/APKINDEX.tar.gz
ERROR: https://dl-cdn.alpinelinux.org/alpine/v3.17/community: temporary error (try again later)
WARNING: Ignoring https://dl-cdn.alpinelinux.org/alpine/v3.17/community: No such file or directory
2 errors; 15 distinct packages available

$ # Time is out of sync
$ docker run --rm alpine date
Sun Jan  0 00:00:00  1900
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment