Docker error while discourse installation

Can anyone please help me with this. I tried several times but keep on getting this error.
I even tried to install docker first and then followed the standard installation method then also i am not able to move ahead and get stuck here

root@subsdeal:/var/discourse# ./discourse-setup
Failed to find or docker on your PATH.
Enter to install Docker from or Ctrl+C to exit
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 15742  100 15742    0     0   101k      0 --:--:-- --:--:-- --:--:--  101k
# Executing docker install script, commit: 28bc4d09b3938ea30c69407d198ee8ece52c3e12
Warning: the "docker" command appears to already exist on this system.

If you already have Docker installed, this script can cause trouble, which is
why we're displaying this warning and provide the opportunity to cancel the

If you installed the current Docker package using this script and are using it
again to update Docker, you can safely ignore this message.

You may press Ctrl+C now to abort this script.
+ sleep 20
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq apt-transport-https ca-certificates curl >/dev/null
+ sh -c curl -fsSL "" | gpg --dearmor -o /usr/share/keyrings/docker-archive-keyring.gpg
+ sh -c echo "deb [arch=amd64 signed-by=/usr/share/keyrings/docker-archive-keyring.gpg] focal stable" > /etc/apt/sources.list.d/docker.list
+ sh -c apt-get update -qq >/dev/null
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq --no-install-recommends  docker-ce-cli docker-scan-plugin docker-ce >/dev/null
+ version_gte 20.10
+ [ -z  ]
+ return 0
+ sh -c DEBIAN_FRONTEND=noninteractive apt-get install -y -qq docker-ce-rootless-extras >/dev/null
+ sh -c docker version
Client: Docker Engine - Community
 Version:           20.10.8
 API version:       1.41
 Go version:        go1.16.6
 Git commit:        3967b7d
 Built:             Fri Jul 30 19:54:27 2021
 OS/Arch:           linux/amd64
 Context:           default
 Experimental:      true

Server: Docker Engine - Community
  Version:          20.10.8
  API version:      1.41 (minimum version 1.12)
  Go version:       go1.16.6
  Git commit:       75249d8
  Built:            Fri Jul 30 19:52:33 2021
  OS/Arch:          linux/amd64
  Experimental:     false
  Version:          1.4.6
  GitCommit:        d71fcd7d8303cbf684402823e425e9dd2e99285d
  Version:          1.0.0-rc95
  GitCommit:        b9ee9c6314599f1b4a7f497e1f1f856fe433d3b7
  Version:          0.19.0
  GitCommit:        de40ad0


To run Docker as a non-privileged user, consider setting up the
Docker daemon in rootless mode for your user: install

Visit to learn about rootless mode.

To run the Docker daemon as a fully privileged service, but granting non-root
users access, refer to

WARNING: Access to the remote API on a privileged Docker daemon is equivalent
         to root access on the host. Refer to the 'Docker daemon attack surface'
         documentation for details:


Still failed to find or docker on your PATH.
Docker install failed. Quitting.


1 Like

What distro are you using? @uckelman sent a PR changing the docker detection logic and it was just merged today and this message comes from there, so it may be related.

1 Like

Oh, hang on. I see what’s wrong. I’ll submit a fix shortly.


PR: FIX: Use the return code from which correctly by uckelman · Pull Request #557 · discourse/discourse_docker · GitHub


Thanks for following it up @uckelman!

@UnicornX can you try:

cd /var/discourse
git pull

working fine now @Falco