Installing Docker on antiX 23 –Solved

Forum Forums New users New Users and General Questions Installing Docker on antiX 23 –Solved

Tagged: 

  • This topic has 13 replies, 6 voices, and was last updated Feb 23-11:34 am by mcwill54.
Viewing 14 posts - 1 through 14 (of 14 total)
  • Author
    Posts
  • #117409
    Member
    algothic

      I had a bit of trouble on installing Docker on AntiX I follow the same method from other distributions and I can’t get the daemon working.
      I try sudo service docker status and I get Docker is not running.. failed
      Can’t find any information about it. Only this:

      I installed using these commands

      $ sudo apt-get update
      $ sudo apt-get upgrade
      $ sudo apt-get install -y apt-transport-https ca-certificates curl software-properties-common
      $ curl -fsSL http://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
      $ echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] http://download.docker.com/linux/debian $(lsb_release -cs) stable" | sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
      $ sudo apt-get update
      $ sudo apt-get install -y docker-ce docker-ce-cli containerd.io
      $ sudo service docker start

      After this process can’t seam to start docker
      Even trying to add my user to the group via sudo usermod -aG docker <username>
      sudo service docker status still get Docker is not running.. failed

      Am I missing something is just because of sysvinit, I’m totally lost.

      • This topic was modified 7 months ago by algothic.
      • This topic was modified 6 months, 4 weeks ago by algothic.
      • This topic was modified 6 months, 4 weeks ago by algothic.
      #117423
      Member
      abc-nix

        Check the docker apt source file:
        cat /etc/apt/sources.list.d/docker.list
        My output:

        $ cat /etc/apt/sources.list.d/docker.list
        deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] http://download.docker.com/linux/debian   bookworm stable

        If this is OK, check if the sysvinit service is available and enabled to start on reboot.
        ls /etc/rc*.d/*docker /etc/init.d/docker
        My output:

        $ ls /etc/rc*.d/*docker /etc/init.d/docker
        /etc/init.d/docker    /etc/rc2.d/S01docker  /etc/rc5.d/S01docker
        /etc/rc0.d/K01docker  /etc/rc3.d/S01docker  /etc/rc6.d/K01docker
        /etc/rc1.d/K01docker  /etc/rc4.d/S01docker

        If not enabled, run
        sudo update-rc.d docker defaults

        I had no problem enabling docker and it is now working:

        $ sudo service docker status
        Docker is running.

        Reboot just in case that is needed (not needed on my system, but it shouldn’t be bad to try).

        #117457
        Member
        algothic

          I tried to all the commands, I rebooted and tried again and got the same output. Did I messed the installation?

          user@antix:~
          $ cat /etc/apt/sources.list.d/docker.list
          deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] http://download.docker.com/linux/debian bookworm stable
          user@antix:~
          $ ls /etc/rc*.d/*docker /etc/init.d/docker
          /etc/init.d/docker    /etc/rc2.d/S02docker  /etc/rc5.d/S02docker
          /etc/rc0.d/K01docker  /etc/rc3.d/S02docker  /etc/rc6.d/K01docker
          /etc/rc1.d/K01docker  /etc/rc4.d/S02docker
          user@antix:~
          $ sudo update-rc.d docker defaults
          user@antix:~
          $ sudo service docker status
          Docker is not running ... failed!

          Thank you @abc-nix

          #117463
          Member
          abc-nix

            It seems to be OK, except for the service status message.
            Try to stop docker first
            sudo service docker stop
            And start the init script to see if there are any error messages.
            sudo /etc/init.d/docker start

            Share the error messages here and we will try to figure out what is going on.

            #117511
            Member
            algothic

              I started a fresh antiX installation and inserted the same commands. I uploaded to the attachments the logs from the terminal of all the docker installation process of installation and the outputs.

              Thank you @abc-nix

              #117523
              Member
              abc-nix

                Hi, algothic. Thanks for providing all terminal instructions you followed and the terminal output for each.

                First, just to point to an unrelated topic, I can see in your terminal output this error
                Error: Timeout was reached
                You will find this error repeat itself every time you run an apt command. This started happening just after the step where you install software-properties-common. I am not sure if this package is a requirement for running docker (I cannot find it in the general instructions for installing docker on Debian), but it could be needed for some docker plugins or addons. Anyway, the error is related to a packagekit hook. I would recommend removing packagekit first (which will also remove software-properties-common) to get rid of the error.
                This is optional, and you can always install software-properties-common again in the future if you see docker or docker-compose misbehaving.

                Now, lets talk about the real issue. Docker requires elogind to work (real dependency, not like in other packages where it is a “listed” dependency). Install it on your antiX system:
                sudo apt install elogind libpam-elogind

                After installing, start docker with the service command you used before
                sudo service docker start
                and check its status.
                sudo service docker status
                It should now be running.

                The original tutorial you followed was from a time when antiX included elogind by default. In recent releases since antiX 22 I believe, elogind is no longer included, following a decision made by the antiX developer to reduce systemd dependencies. Most programs don’t need it, but in this case docker does, so you have to install it manually.

                I tested the suggestions on a clean live-USB of antiX 23 runit full to check if they worked, and the docker service started properly after installing elogind. Let me know if you still have issues with your docker installation and we will work on them.

                Regards,
                abc-nix

                #117782
                Member
                algothic

                  Thank you in the first place, you saved my productivity ????. Having docker for me is great because I can access Logseq from a low end pc.

                  By the way:

                  You will find this error repeat itself every time you run an apt command. This started happening just after the step where you install software-properties-common. I am not sure if this package is a requirement for running docker (I cannot find it in the general instructions for installing docker on Debian), but it could be needed for some docker plugins or addons. Anyway, the error is related to a packagekit hook. I would recommend removing packagekit first (which will also remove software-properties-common) to get rid of the error.
                  This is optional, and you can always install software-properties-common again in the future if you see docker or docker-compose misbehaving.

                  How did correlate this behavior with software-properties-common I couldn’t understood the connection o the error.
                  After your post, I started again a clean antiX and followed this guide Install Docker Engine on Debian that you indicated me, and installed elogind libpam-elogind.

                  How did you found out this solution for the issue?

                  Now, lets talk about the real issue. Docker requires elogind to work (real dependency, not like in other packages where it is a “listed” dependency). Install it on your antiX system:
                  sudo apt install elogind libpam-elogind

                  I’m asking all this question to understand more about quirks about antix and how to troubleshoot it.

                  Again thank you @abc-nix great enlightenment that you gave me ????.

                  Regards

                  #117790
                  Member
                  PPC

                    I followed this thread with some interest, since I participated in a precious one about the subject: https://www.antixforum.com/forums/topic/how-do-i-install-and-run-docker-on-antix22/

                    I appreciate the insight that, on antiX 23 Docker requires elogind libpam-elogind to be installed, so thanks @abc-nix

                    Also, @algothic – if possible, please rename the Thread to “Installing Docker on antiX 23” and mark it as “Solved”- to make it simpler for any antiX user to find the answer to that problem.

                    P.

                    #117793
                    Forum Admin
                    anticapitalista

                      Just wondering whether Docker would work with consolekit and libpam-ck-connector rather than elogind libpam-elogind

                      Philosophers have interpreted the world in many ways; the point is to change it.

                      antiX with runit - leaner and meaner.

                      #117846
                      Member
                      abc-nix

                        Thank you in the first place, you saved my productivity ????. Having docker for me is great because I can access Logseq from a low end pc.

                        No problem. I used docker on my working antiX system until I moved it to a separate home server, so I know docker works well on antiX.

                        How did correlate this behavior with software-properties-common

                        I usually highlight all text that contain the word “error” on my text editor so it was easy to follow. Reading your log file, the last use of apt before the error appeared was when you installed software-properties-common. This is the biggest clue (as apt-transport-https ca-certificates and curl were already installed).
                        If at some point in time you need to install software-properties-common, or some other package causes the same error as before, I created a few policykit packages with the fix (no more errors with packagekit).

                        How did you found out this solution for the issue?

                        docker works on my main antiX computer, so it should also work on antiX 23. The biggest difference between both is me using elogind. Some different tests, and installing elogind “fixed” it. Though maybe anticapitalista’s suggestion of using consolekit also works, and you can replace elogind.

                        I’m asking all this question to understand more about quirks about antix and how to troubleshoot it.

                        To troubleshoot you need to check any logs, enable verbose output, and if needed, use tools like strace to trace program execution. Experience is the most important factor to figure things out, but only time and tinkering can help there.

                        • This reply was modified 6 months, 4 weeks ago by abc-nix. Reason: better wording
                        #130792
                        Member
                        dinesh.gupta01

                          Hi All,

                          After installing Docker on Anitx 23 as suggested above. Docker installed successfully but unable to fetch the images on . getting below error:

                          $ sudo docker run hello-world
                          Unable to find image ‘hello-world:latest’ locally
                          docker: Error response from daemon: Head “https://registry-1.docker.io/v2/library/hello-world/manifests/latest&#8221;: dial tcp [2600:1f18:2148:bc00:41e1:f57f:e2e2:5e54]:443: connect: network is unreachable.
                          See ‘docker run –help’.

                          demo@antix1:~
                          $ sudo service docker status
                          Docker is running.

                          Please help me on this

                          #130793
                          Member
                          PPC

                            After installing Docker on Anitx 23 as suggested above. Docker installed successfully but unable to fetch the images

                            You did follow all my instructions over at https://www.antixforum.com/forums/topic/how-do-i-install-and-run-docker-on-antix22/#post-96048 , right?

                            #134009
                            Member
                            mcwill54

                              Hi guys. In antix 23 legacy
                              I fixed this by adding the following line in /etc/fstab

                              cgroup /sys/fs/cgroup cgroup defaults 0 0

                              I recommend doing this before installing docker. But I don’t think you have to.

                              Restart system

                              Docker is tuning perfect.

                              In antix 23.1 UEFI do not work.

                              • This reply was modified 1 month, 4 weeks ago by mcwill54.
                              #134016
                              Member
                              mcwill54

                                I installed docker on antix 23.1 UEFI, and docker fails to start…it shows these errors in the docker log

                                time=”2024-02-23T08:30:38.897489128-03:00″ level=info msg=serving… address=/var/run/docker/containerd/containerd.sock.ttrpc
                                time=”2024-02-23T08:30:38.897522311-03:00″ level=info msg=serving… address=/var/run/docker/containerd/containerd.sock
                                time=”2024-02-23T08:30:38.897541883-03:00″ level=info msg=”containerd successfully booted in 0.034971s”
                                time=”2024-02-23T08:30:39.816005074-03:00″ level=info msg=”[graphdriver] using prior storage driver: overlay2″
                                time=”2024-02-23T08:30:39.819795498-03:00″ level=info msg=”Loading containers: start.”
                                time=”2024-02-23T08:30:39.967764213-03:00″ level=info msg=”stopping event stream following graceful shutdown” error=”<nil>” module=libcontainerd namespace=moby
                                time=”2024-02-23T08:30:39.969252222-03:00″ level=info msg=”stopping healthcheck following graceful shutdown” module=libcontainerd
                                time=”2024-02-23T08:30:39.969788413-03:00″ level=info msg=”stopping event stream following graceful shutdown” error=”context canceled” module=libcontainerd namespace=plugins.moby
                                failed to start daemon: Error initializing network controller: error obtaining controller instance: failed to register “bridge” driver: unable to add return rule in DOCKER-ISOLATION-STAGE-1 chain: (iptables failed: iptables –wait -A DOCKER-ISOLATION-STAGE-1 -j RETURN: iptables v1.8.9 (nf_tables): RULE_APPEND failed (No such file or directory): rule in chain DOCKER-ISOLATION-STAGE-1
                                (exit status 4))

                                Does anyone have any idea how to resolve this?

                              Viewing 14 posts - 1 through 14 (of 14 total)
                              • You must be logged in to reply to this topic.