Docker installation guide

This mod is done at your own risk

You should know this

Remember you have to be in the right folder, use “cd” to go to another folder

“docker-compose up” to start all containers

“docker-compose down” to stop all containers

“docker-compose restart ” to restart a specific container

“docker-compose ps” to see current containers

 

Docker Raspberry installation

When you copy and paste make sure to leave the quotations they are NOT a part of it

 

Prep

Flash with raspbian OS

Enable ssh

Set up wifi or plug in ethernet

Run “sudo apt-get update”

Run “sudo apt-get upgrade”

 

Install docker

Run “curl -fsSL https://get.docker.com -o get-docker.sh”

Run “sudo sh get-docker.sh”

Run “sudo usermod -aG docker pi”

Run “docker version” to make sure docker is installed correctly

 

Install docker-compose

Run “sudo apt-get install libffi-dev libssl-dev”

Run “sudo apt install python3-dev”

Run “sudo apt-get install -y python3 python3-pip”

Run “sudo pip3 install docker-compose”

 

Configuration

Check out our example config file here https://pastebin.com/EJTr7uga

Make a new folder with:

“mkdir sp”

Go to new folder with:

“cd sp”

Create and open docker-compose.yaml with:

“sudo nano docker-compose.yaml”

This is your configuration file, note that indentation is important.

Copy paste

change so they have a unique name

change so they have a unique port

then uncomment the usb connecting you are using (often USB0)

version: '2.4'

 

services:

  sp:

    image: octoprint/octoprint

    restart: unless-stopped

    ports:

      - :80

    devices:

    #  - /dev/ttyUSB0:/dev/ttyUSB0

    #  - /dev/ttyUSB1:/dev/ttyUSB1

    #  - /dev/ttyUSB2:/dev/ttyUSB2

    #  - /dev/ttyACM0:/dev/ttyACM0 

 

    volumes:

      - ./sp:/octoprint

 

    #environment:

    #  - ENABLE_MJPG_STREAMER=true

Add another one for each container you want, all the names (sp) should have the same indentation

sp:

    image: octoprint/octoprint

    restart: unless-stopped

    ports:

      - :80

    devices:

    #  - /dev/ttyUSB0:/dev/ttyUSB0

    #  - /dev/ttyUSB1:/dev/ttyUSB1

    #  - /dev/ttyUSB2:/dev/ttyUSB2

    #  - /dev/ttyACM0:/dev/ttyACM0 

 

    volumes:

      - ./sp:/octoprint

 

    #environment:

    #  - ENABLE_MJPG_STREAMER=true

Save the file and exit

run “docker.compose up” to start up your containers :D