Play Raspberry Pi(6)Upgrade and Docker

Play Raspberry Pi(6)Upgrade and Docker

Download the latest file again from here https://www.raspberrypi.org/downloads/raspbian/

The file is  2016-05-27-raspbian-jessie-lite.img

following this link
http://sillycat.iteye.com/blog/2166582

1 Set up Network
The installation is fine and I set up user carl. But it seems some difference to set up the static IP.
http://www.jeffgeerling.com/blog/2016/setting-static-ip-address-raspbian-jessie-lite-on-raspberry-pi

> cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

iface eth0 inet static
address 192.168.0.198
gateway 192.168.0.1
netmask 255.255.255.0
dns-nameservers 8.8.8.8 8.8.4.4

allow-hotplug wlan0
iface wlan0 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

allow-hotplug wlan1
iface wlan1 inet manual
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

And I need to change another config file for this new version.
> cat /etc/dhcpcd.conf
# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

…snip...
interface eth0
static ip_address=192.168.0.198
static routers=192.168.0.1
static domain_name_servers=8.8.8.8 8.8.4.4

2 Set up Disk
http://sillycat.iteye.com/blog/2254550

>sudo apt-get install ntfs-3g
>sudo fdisk -l
>sudo mkdir /mnt/driver1
>sudo mount -t auto /dev/sda1 /mnt/driver1

Give more AC Power to USB
>sudo vi /boot/config.txt
Add this 2 lines and reboot the system.
max_usb_current=1
safe_mode_gpio=4

3 Set up Docker on Server
http://sillycat.iteye.com/blog/2264110

https://github.com/umiddelb/armhf/wiki/Get-Docker-up-and-running-on-the-RaspberryPi-(ARMv6)-in-four-steps-(Wheezy)
http://blog.hypriot.com/downloads/

download the latest docker file
> wget https://downloads.hypriot.com/docker-hypriot_1.10.3-1_armhf.deb

Install that on the server
> sudo dpkg -i docker-hypriot_1.10.3-1_armhf.deb

enable the sudo er to run it
> sudo usermod -aG docker carl

> sudo systemctl enable docker.service

Reboot the system, then we can use
> docker images

> docker ps

> docker info

Configure docker to using USB drivers.
> cat /etc/default/docker
# Docker Upstart and SysVinit configuration file

# Use DOCKER_OPTS to modify the daemon startup options.
#DOCKER_OPTS="--dns 8.8.8.8 --dns 8.8.4.4"
DOCKER_OPTS="--storage-driver=overlay -D -g /opt/docker"

Check the docker Information
>docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 0
Server Version: 1.10.3
Storage Driver: overlay
Backing Filesystem: <unknown>
Execution Driver: native-0.2
Logging Driver: json-file
Plugins:
Volume: local
Network: bridge null host
Kernel Version: 4.4.11+
Operating System: Raspbian GNU/Linux 8 (jessie)
OSType: linux
Architecture: armv6l
CPUs: 1
Total Memory: 434.7 MiB
Name: raspberrypi1
ID: V467:PPZX:4MYC:SQXY:QHOD:KKM3:7WKN:SGY4:RSGV:MXV3:R4QG:W4BV
Debug mode (server): true
File Descriptors: 11
Goroutines: 20
System Time: 2016-06-16T11:23:08.393869157-05:00
EventsListeners: 0
Init SHA1: 0db326fc09273474242804e87e11e1d9930fb95b
Init Path: /usr/lib/docker/dockerinit
Docker Root Dir: /mnt/driver1/data/docker
WARNING: No swap limit support
WARNING: No cpu cfs quota support
WARNING: No cpu cfs period support
WARNING: No cpuset support

Yeah, start to set up mongo, ftp and all other things in docker.
http://sillycat.iteye.com/blog/2264656
http://sillycat.iteye.com/blog/2255064

References:
https://www.raspberrypi.org/downloads/raspbian/

https://github.com/umiddelb/armhf/wiki/Get-Docker-up-and-running-on-the-RaspberryPi-(ARMv6)-in-four-steps-(Wheezy)
http://blog.hypriot.com/post/run-docker-rpi3-with-wifi/
http://sillycat.iteye.com/blog/2166582

猜你喜欢

转载自sillycat.iteye.com/blog/2305620