Skip to main content

Docker instal on raspberry pi

Optional customizations
At this point you may want to edit the hostname of the Pi. Use an editor and change the word raspberrypi to something else in:
  • /etc/hosts
  • /etc/hostname
If you are using the Pi for a headless application then you can reduce the memory split between the GPU and the rest of the system down to 16mb.
Edit /boot/config.txt and add this line:
gpu_mem=16

Start the Docker installer

An automated script maintained by the Docker project will create a systemdservice file and copy the relevant Docker binaries into /usr/bin/.
$ curl -sSL https://get.docker.com | sh
Until recently installing Docker on a Pi was a very manual process which often meant having to build Docker from scratch on a very underpowered device (this could take hours). Lots of hard work by ARM enthusiasts Hypriot has helped make .deb packages a first-class citizen in Docker's own CI process.
If you would like to opt into using a testing version then replace get.docker.comwith test.docker.com. This will bring down a newer version but it may still have some open issues associated with it.
Beware that this work does not extend to non-Debian distributions such as Arch Linux or Fedora. Arch Linux for ARM currently has Docker 1.11 available in its package manager pacman.

Configure Docker

There are a couple of manual steps needed to get the best experience.

Set Docker to auto-start

$ sudo systemctl enable docker
You can now reboot the Pi, or start the Docker daemon with:
$ sudo systemctl start docker

Enable Docker client

The Docker client can only be used by root or members of the docker group. Add pi or your equivalent user to the docker group:
$ sudo usermod -aG docker pi
After making this change, log out and reconnect with ssh.

Comments

Popular posts from this blog

Raspberry pi Ser2Net Install

sudo apt-get install ser2net sudo nano /etc/ser2net.conf % change last lines to 2000:raw:600:/dev/ttyAMA0:57600 8DATABITS NONE  1STOPBIT banner sudo /etc/init.d/ser2net restart sudo nano /etc/inittab % add hash to this line #T0:23:respawn:/sbin/getty -L ttyAMA0 115200 vt100 sudo nano /boot/cmdline.txt % delete references to ttyAMA0 % "console=ttyAMA0,115200 kgdboc=ttyAMA0,115200" sudo shutdown -r now

Modem Connection with raspberry py

Aim : Set up the  Raspberry Pi  as a wireless router using the Raspbian OS. The internet connection will be provided by a  Huawei E303  USB 3g dongle on the safaricom network in Kenya, though the setup should be similar on most Huawei dongles and 3g networks. The wireless access point will be provided by an  Edimax Nano USB Wifi adapter . Power Source -------->RPI ----> Powered USB HUB -----> 3g Dongle                                            |                                            |                                          Edimax                       ...

OpenCV Docker Image and use

Open CV Install docker mage run $ docker ps $ docker start 0c5f0bc9b04c $ docker ps -a We need to go Self terminal not SSH terminal $ gksudo open a bog and type lxterminal Python and OpenCV. Alright, now we can finally start writing some code! Open up a new file, name it   test_image . py  , and insert the following code: Accessing the Raspberry Pi Camera with OpenCV and Python Python 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 # import the necessary packages from picamera . array import PiRGBArray from picamera import PiCamera import time import cv2   # initialize the camera and grab a reference to the raw camera capture camera = PiCamera ( ) rawCapture = PiRGBArray ( camera )   # allow the camera to warmup time . sleep ( 0.1 )   # grab an image from the camera camera . capture ( rawCapture , format = "bgr" ) image = rawC...