No internet connection
  1. Home
  2. Support

Can't install docker

By @xkx
    2022-08-17 23:47:33.154Z

    Hello every one.
    I'm a student in grade 11 in Thailand. English isn't my native language.
    I'm very newbie in Linux or Server. But I have to made a forum for my project.
    After I looking for a lots of forum software. I choose talkard for my project.

    But when I try to install talkyard form this guide https://github.com/debiki/talkyard-prod-one
    I stuck in step 5.Install Docker: It's show error below.

    "Package docker-ce is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source
    However the following packages replace it:
    docker-ce-cli

    Package docker-ce-cli is not available, but is referred to by another package.
    This may mean that the package is missing, has been obsoleted, or
    is only available from another source

    E: Version '5:20.10.5~3-0~ubuntu-focal' for 'docker-ce' was not found
    E: Version '5:20.10.5~3-0~ubuntu-focal' for 'docker-ce-cli' was not found
    2022-08-17T23:23:58+00:00 install-docker: Testing Docker: running 'docker run hello-world' ...
    ./scripts/install-docker-compose.sh: line 106: docker: command not found

    2022-08-17T23:23:58+00:00 install-docker: Error installing or starting Docker: 'docker run hello-world' doesn't work. [EdEDKRBROKEN]
    2022-08-17T23:23:58+00:00 install-docker: Ask for help in the Talkyard forum: About the Sandbox category
    2022-08-17T23:23:58+00:00 install-docker: and/or in the Docker forums: https://forums.docker.com/"

    So Please help me to slove its. Or tell me how or what I should to do. Please.

    Thank you.

    Solved in post #7, click to view
    • 9 replies
    1. X
      @xkx
        2022-08-23 01:11:15.103Z

        Pass 5 days without any responded or just only approved this topic.

        Now I change my project to Discourse forums and everythings work great. And the Discourse community is vely worm welcome.

        So I'm very Sorry to disturb everyone here.
        Thank you and GoodBYE.

        1. Hi xkx, sorry for the late reply. About the error messages: docker-ce not available, that's is odd, haven't seen that before. What Linux distribution and version did you try?

          Anyway good that Discourse is working fine. — Not that this is of any help to you now, but anyway, I think that in about two months, there'll be people here replying to questions sooner.

          1. X@xkx
              2022-08-27 10:58:08.689Z

              Ubuntu 22.04 LTS sir.

              1. Thanks! (Hmm, I'm surprised it was 22.04, I'd have guessed 18.x — I'll have to investigate some time later ...)

                1. X@xkx
                    2022-09-13 02:47:44.575Z

                    Do you have any update please.
                    Now. My study project is ended. But I want to try Talkard for my personal forums.

                    Or If you can Please help. Please.

                    1. Hi @xkx, you can try this: Edit the file scripts/install-docker-compose.sh on the server where you'd like to install Talkyard,

                      and on lines 100 and 101, remove =$DOCKER_VERSION. That'll make the script install the most recent Docker version available in that Linux distro. (Instead of trying to install the apparently non-existing version 5:20.10.5~3-0~ubuntu-focal.)

                      So, before, the script around lines 100 and 101 looks like this:

                      DOCKER_VERSION="5:20.10.5~3-0~ubuntu-focal"
                      log_message "Installing Docker $DOCKER_VERSION ..."
                      apt-get update
                      apt-get -y install \
                         docker-ce=$DOCKER_VERSION \
                         docker-ce-cli=$DOCKER_VERSION \
                         containerd.io
                      

                      And after the changes:

                      DOCKER_VERSION="5:20.10.5~3-0~ubuntu-focal"
                      log_message "Installing Docker $DOCKER_VERSION ..."
                      apt-get update
                      apt-get -y install \
                         docker-ce \
                         docker-ce-cli \
                         containerd.io
                      

                      Then try running the script again.

                      Let me know how this works?

                      (Not impossible that there'll be some problem with Docker-Compose. The script tries to install v1.28, but the latest version is 2.x.)

                      ReplySolution
                      1. X@xkx
                          2022-09-15 09:20:20.187Z2022-09-16 01:22:34.595Z

                          After install in step 9. I got this error.

                          "2022-09-15T09:09:20+00:00 upgrade-script: Installing: Starting version v0.2022.10-d09071401...
                          Creating network "talkyard_internal_net" with driver "bridge"
                          Failed to Setup IP tables: Unable to enable SKIP DNAT rule: (iptables failed: iptables --wait -t nat -I DOCKER -i br-44ebf39352af -j RETURN: iptables: No chain/target/match by that name.
                          (exit status 1))"

                          please Help.

                          1. X@xkx
                              2022-09-16 03:51:29.543Z

                              The problem fixed.
                              I reinstall Ubuntu 22.04 in VPS Control Panel. Then reinstall Talkyard.
                              I still have to change Edit the file scripts/install-docker-compose.sh before install docker.
                              And have to install ufw with the guide script because I don't have enough knowlage to install and setting firewalld.
                              At the end my Talkyard forum is work fine. Now.

                              The last questions.
                              My VPS has only 25 GB storage. And I have another 500 GB storage vps.
                              Can I use NFS (Network File System) as storage for Talkyard forum. If I can? how to setting or have to do?

                              1. Can I use NFS (Network File System)

                                I'd say it's almost never worth the time — usually simpler to get a bigger disk. Still, sometimes it can make sense to store uploaded files, or maybe backup archives, on a NFS or in some object storage, e.g. Google Cloud Storage or AWS S3.

                                (I wouldn't store the PostgreSQL database files on a NFS though — that could make Ty really slow, I'd think.)

                                For example, you could mount /opt/talkyard/data/uploads/ and /opt/talkyard-backups/ on a NFS. — But then, if the NFS is offline for some reason, maybe you'd spend hours and hours troubleshooting Talkyard, until you realize that it's the NFS somehow. Or backup archives didn't get saved, because the NFS was offline.

                                Anyway, in the past I've been using fuse and cron to mount a Google Cloud Storage bucket:

                                server:/opt/talkyard# crontab -l  
                                # ...
                                @reboot echo '---REBOOT---' >> /opt/talkyard-cron.log
                                @reboot echo '/opt/talkyard-mount-backups-bucket.sh >> /opt/talkyard-cron.log 2>&1' | at now + 5 minutes
                                # ...
                                
                                server:/opt/talkyard# cat /opt/talkyard-mount-backups-bucket.sh
                                #!/bin/bash
                                mkdir -p /opt/talkyard-backup-archives-in-gcs
                                /usr/bin/gcsfuse backups-bucket-name /opt/talkyard-backup-archives-in-gcs
                                

                                but that's not the same as a NFS.

                                In your case, I'd websearch for "linux mount NFS" but I haven't mounted any NFS myself so I don't know much more than that.

                                ***

                                I still have to change Edit the file ...

                                Ok, yes apparently the older version of Docker, referred to in the script, isn't available in Ubuntu 22.04 — I suppose only newer versions are found there.

                                Thanks for the update anyway, and I'm glad it works.