Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
getting-started:raspberry-pi-docker-install [2018/03/16 09:48]
Elco Jacobs [Deploy the BrewPi container]
getting-started:raspberry-pi-docker-install [2019/03/16 16:51] (current)
99.93.141.76 Changed step for updating the packages on Raspian.
Line 57: Line 57:
 ------------- -------------
 ==== Find the Raspberry Pi on your local network ==== ==== Find the Raspberry Pi on your local network ====
-It might not be necessary to find and remember the IP-address of your Raspberry Pi. It will register itself on the network as ''​rasbperrypi.local''​. This is provided by the package ''​avahi-daemon''​ and it is called Zeroconf.+It might not be necessary to find and remember the IP-address of your Raspberry Pi. It will register itself on the network as ''​raspberrypi.local''​. This is provided by the package ''​avahi-daemon''​ and it is called Zeroconf.
  
 If the .local address doesn'​t work, you can use the app Fing ([[https://​play.google.com/​store/​apps/​details?​id=com.overlook.android.fing|Android]] / [[https://​itunes.apple.com/​gb/​app/​fing-network-scanner/​id430921107|iOS]]). \\  This app can scan your local network for devices. If our Raspberry Pi successfully connected to your network, it should be on the list. Make a note of the IP address. If the .local address doesn'​t work, you can use the app Fing ([[https://​play.google.com/​store/​apps/​details?​id=com.overlook.android.fing|Android]] / [[https://​itunes.apple.com/​gb/​app/​fing-network-scanner/​id430921107|iOS]]). \\  This app can scan your local network for devices. If our Raspberry Pi successfully connected to your network, it should be on the list. Make a note of the IP address.
Line 97: Line 97:
 Update the packages on the system: Update the packages on the system:
 <​code>​ <​code>​
-sudo apt update & sudo apt dist-upgrade+sudo apt-get update ​&& sudo apt-get dist-upgrade
 </​code>​ </​code>​
  
 Install Docker Install Docker
 <​code>​ <​code>​
-curl -sSL https://get.docker.com ​sh+curl -fsSL get.docker.com ​-o get-docker.sh && sh get-docker.sh
 </​code>​ </​code>​
  
Line 122: Line 122:
 The command to deploy portainer is: The command to deploy portainer is:
 <​code>​ <​code>​
 +docker pull portainer/​portainer
 docker run -d -p 9000:9000 -v /​var/​run/​docker.sock:/​var/​run/​docker.sock --restart always --name portainer portainer/​portainer -H unix:///​var/​run/​docker.sock docker run -d -p 9000:9000 -v /​var/​run/​docker.sock:/​var/​run/​docker.sock --restart always --name portainer portainer/​portainer -H unix:///​var/​run/​docker.sock
 </​code>​ </​code>​
Line 157: Line 158:
  
 <​code>​ <​code>​
-docker run -d --name brewpi -p 80:80 -p 81:81 -v ~/​brewpi-data:/​data -v /​etc/​timezone:/​etc/​timezone -v /​etc/​localtime:/​etc/​localtime --restart always brewpi/​brewpi-raspbian+docker pull brewpi/​brewpi-raspbian 
 +docker run -d --name brewpi ​--privileged ​-p 80:80 -p 81:81 -v ~/​brewpi-data:/​data -v /​etc/​timezone:/​etc/​timezone -v /​etc/​localtime:/​etc/​localtime --restart always brewpi/​brewpi-raspbian
 </​code>​ </​code>​
  
Line 165: Line 167:
 | <​code>​-d</​code> ​                                                              | After starting the container, run it as daemon in the background. ​                                                         | | <​code>​-d</​code> ​                                                              | After starting the container, run it as daemon in the background. ​                                                         |
 | <​code>​--name brewpi</​code> ​                                                   | Name the new container brewpi, modify this you are running multiple brewpi containers. ​                                    | | <​code>​--name brewpi</​code> ​                                                   | Name the new container brewpi, modify this you are running multiple brewpi containers. ​                                    |
 +| <​code>​--privileged</​code> ​                                                    | Run with elevated permissions to access serial ports that are present when the container starts. ​                         |
 | <​code>​-p 80:​80</​code> ​                                                        | Map port 80 of the container to port 80 of the host. <br> If port 80 is in use, use a different port, for example 8000:80. | | <​code>​-p 80:​80</​code> ​                                                        | Map port 80 of the container to port 80 of the host. <br> If port 80 is in use, use a different port, for example 8000:80. |
 | <​code>​-p 81:​81</​code> ​                                                        | Map port 81 of the container to port 81 of the host.                                                                       | | <​code>​-p 81:​81</​code> ​                                                        | Map port 81 of the container to port 81 of the host.                                                                       |
Line 172: Line 175:
 | <​code>​brewpi/​brewpi-raspbian</​code> ​                                          | The image that is used. Use''​brewpi/​brewpi-raspbian''​ for the raspberry pi, ''​brewpi/​brewpi-ubuntu''​ for x64/x86 systems. ​ | | <​code>​brewpi/​brewpi-raspbian</​code> ​                                          | The image that is used. Use''​brewpi/​brewpi-raspbian''​ for the raspberry pi, ''​brewpi/​brewpi-ubuntu''​ for x64/x86 systems. ​ |
  
- 
-=== Connecting the Spark via USB === 
- 
-If you want to connect to the BrewPi Spark over USB, you need to give the container access to hardware devices. The easiest way to do this is to pass the '​--privileged'​ flag. 
- 
-<​code>​ 
-docker run -d --name brewpi -p 80:80 -p 81:81 --privileged -v ~/​brewpi-data:/​data -v /​etc/​timezone:/​etc/​timezone -v /​etc/​localtime:/​etc/​localtime --restart always brewpi/​brewpi-raspbian 
-</​code>​ 
  
 Please note that you need to have the BrewPi Spark connected via USB when the container starts for it to be available to the container. Please note that you need to have the BrewPi Spark connected via USB when the container starts for it to be available to the container.
- +In the web interface, ​you can select the serial number (for USB) or enter the IP address of the Spark to connect.
- +
-=== Connecting ​the BrewPi Spark via WiFi === +
- +
-If you want to connect to the BrewPi ​Spark via WiFi, no extra docker parameters are needed.+
  
 === Change the password for port 81 === === Change the password for port 81 ===