DockSTARTer: Raspberry Pi Installation not working [Bug]

Installation doesn’t complete correctly on Pi. I’ve broken it down into 2 parts.

To Reproduce Part One Steps to reproduce the behavior:

  1. Flash new MicroSD card with latest Raspbian Stretch Lite from https://www.raspberrypi.org/downloads/raspbian/ (2018-06-27-raspbian-stretch-lite.zip)
  2. Install Git with sudo apt-get install git -y
  3. Clone DockSTARTer
  4. begin installation with sudo bash ~/.docker/main.sh -i
  5. Process completes with out incident:
pi@raspberrypi:~ $ sudo bash ~/.docker/main.sh -i
[INFO]        Checking root permissions.
[INFO]        Updating repositories.
[INFO]        Upgrading packages.
[INFO]        Installing dependencies.
[INFO]        Removing unused packages.
[INFO]        Cleaning up unused packages.
[INFO]        Installing latest yq.
[INFO]        Installing latest docker. Please be patient, this will take a while.
pi@raspberrypi:~ $ 
  1. attempting to run the following fails
pi@raspberrypi:~ $ docker run hello-world
docker: Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Post http://%2Fvar%2Frun%2Fdocker.sock/v1.38/containers/create: dial unix /var/run/docker.sock: connect: permission denied.
See 'docker run --help'.
  1. Adding the current user to the group docker with sudo usermod -aG docker $USER and then rebooting seems to work:
pi@raspberrypi:~ $ docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
ad0f38092cf2: Pull complete
Digest: sha256:4b8ff392a12ed9ea17784bd3c9a8b1fa3299cac44aca35a85c90c5e3c7afacdc
Status: Downloaded newer image for hello-world:latest

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (arm32v7)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/engine/userguide/

Part Two

  1. docker-compose doesnt appear to be installed. After getting hello-world working (above):
pi@raspberrypi:~ $ docker-compose ps
-bash: docker-compose: command not found
pi@raspberrypi:~ $ cd .docker/compose/
pi@raspberrypi:~/.docker/compose $ docker-compose ps
-bash: docker-compose: command not found

The offical Linux way to install docker-compose is to use GitHub, but there aren’t pre-built binaries for ARM. The easiest way I’ve found is to use pip. 2. Install pip via sudo apt-get install python-pip -y 3. Install docker-compose via sudo pip install docker-compose 4. Once it completes you can then run docker-compose as expected.

pi@raspberrypi:~/.docker/compose $ sudo bash ~/.docker/main.sh -g
[INFO]        Checking root permissions.
[INFO]        Generating docker-compose.yml file.
[INFO]        Required files included.
[INFO]        /home/pi/.docker/compose/.env found.
[INFO]        Checking for enabled apps.
[INFO]        PORTAINER_NETWORK_MODE supports port mapping. Ports will be included.
[INFO]        All configurations for PORTAINER are included.
[INFO]        WATCHTOWER_NETWORK_MODE supports port mapping. Ports will be included.
[INFO]        All configurations for WATCHTOWER are included.
[INFO]        Merging docker-compose.yml complete.
[INFO]        Would you like to run your selected containers now?
[Yn]y
[INFO]        Taking ownership of /home/pi/.docker for user 1000 and group 1000
[INFO]        Setting folder permissions in /home/pi/.docker to 755
[INFO]        Setting file permissions in /home/pi/.docker to 644
Creating network "compose_default" with the default driver
Pulling watchtower (v2tec/watchtower:armhf-latest)...
armhf-latest: Pulling from v2tec/watchtower
a5415f98d52c: Pull complete
c3f7208ad77c: Pull complete
66d662b1bb9f: Pull complete
Digest: sha256:63abf3fc71a46b8fc46674342766d976e6a97d6c70d2560a0986ec63c1784812
Status: Downloaded newer image for v2tec/watchtower:armhf-latest
Pulling portainer (portainer/portainer:)...
latest: Pulling from portainer/portainer
d1e017099d17: Pull complete
078b760c5ca5: Pull complete
Digest: sha256:166ea71afde944c36758bbe42389d18c100f431fe72aacdc2e8c32ae9d9f0535
Status: Downloaded newer image for portainer/portainer:latest
Creating portainer  ... done
Creating watchtower ... done
pi@raspberrypi:~/.docker/compose $ docker-compose ps
   Name                 Command               State           Ports
----------------------------------------------------------------------------
portainer    /portainer -H unix:///var/ ...   Up      0.0.0.0:9000->9000/tcp
watchtower   /watchtower --schedule 0 0 ...   Up

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Comments: 30 (14 by maintainers)

Commits related to this issue

Most upvoted comments

Just confirming that the news steps as suggested by @nemchik above (and now in the wiki) worked perfectly on 2 separate fresh OS installs of Raspbian Stretch Lite (2018-06-27).

Thanks guys!

sudo apt-get update
sudo apt-get dist-upgrade -y
sudo reboot

##

sudo apt-get install git -y
git clone https://github.com/GhostWriters/DockSTARTer ~/.docker

sudo bash ~/.docker/main.sh -i
sudo reboot

##

cd ~/.docker/compose
cp .env.example .env
nano .env

sudo bash ~/.docker/main.sh -g
# Select "y" to run containers now # 

Just want to mention that I happened across DockSTARTer today, attempted an install on my Raspberry Pi 3 B+ (with fresh Stretch Lite install) and faced the same issues as @oranblackwell.

His permission fix and pip install fixed it completely for me.

Maybe it’s worth adding that information to the “Getting Started” docs? Cheers

Ok, after some extensive testing and tons of fresh installs and even attempting an emulator on my own system @TommyE123 and I have found that you need to update and reboot your system BEFORE attempting to do anything with DS on a clean install. We have updated the wiki accordingly https://github.com/GhostWriters/DockSTARTer/wiki/Getting-Started#update-and-reboot-your-system

P.S. this does not negate the need for a reboot later when the script prompts for it