Quantcast
Channel: CodeSection,代码区,Linux操作系统:Ubuntu_Centos_Debian - CodeSec
Viewing all articles
Browse latest Browse all 11063

Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3

$
0
0

Raspberry Pi 3 Model B is the first 64 bit version and the third generation Pi box which runs on 1.2GHz 64 bit quad-core ARMv8 CPU.(Broadcom BCM2837 A53 ARM processor). Despite its processor upgrade, there wasn’t an official 64-bit OS available for it till the first week of Jan 2017. Kudos to SUSE Team, they came up providing first commercial enterprise linux distribution optimized for ARM AARCH64 servers. This is definitely a BIG news. Reason To build a solution to meet specific market needs while maintaining a common code base. Enterprise vendors & customers demanding workload-optimized server platforms can now radically expand it for their modern data centers.


Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3

In the last couple of months, Docker enthusiasts have been working hard to get Docker running on ARM 32bit systems (like Raspberry Pi). With Docker Engine 1.12.1, a FIRST ARM Debian package was officially made available by Docker Inc. which happened late last year. This year, SUSE Team did a great job in bringing capabilities of SUSE Linux(a.k.a SLES for ARM) to the ARM AArch64 hardware platform. This is BIG news for Docker community too as more innovation and development is expected to grow building containers which will run across the upcoming AARCH64 platform.

Under this blog, I am going to test drive Docker 1.12.3 on first 64-bit ARM Open SUSE distribution running on Raspberry Pi 3 box.

Hardware: Raspberry Pi 3 ( You can order it from Amazon in case you are in India for $35) Micro-SD card reader ( I got it from here ) Any windows or Linux Desktop or Laptop HDMI cable ( I used the HDMI cable of my plasma TV) Internet Connectivity(WiFi/Broadband/Tethering using Mobile) to download Docker 1.12.1 package Keyboard & mouse connected to Pi’s USB ports
Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3

Source~ http://www.rlocman.ru/i/Image/2016/02/29/RaspberryPi_3_1.jpg

Software: SD-Formatter to format microSD card Rufus(in case you have Windows OS running on your laptop) to burn OpenSUSE Leap 42.2 ARM XZ format directly into microSD card.(No need to extract XZ using any tool)

Steps:

Format the microSD card using SD Formatter as shown below:
Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3

2. Download OpenSUSE Leap 42.2 ARM OS from here and use Win32 imager(in case you are on Windows OS running on your laptop)to burn it on microSD card.


Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3

3. Insert the microSD card into your Pi box. Now connect the HDMI cable from one end of Pi’s HDMI slot to your TV or display unit and mobile charger(recommended 5.1V@1.5A) as shown:


Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3

4.You will see the fancy GUI coming up on your display:


Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3

5. To enable VNC, run the below command:

linux:~ # zypper install xorg-x11-Xvnc

Installing Docker 1.12.3 on first 64-bit ARM OpenSUSE

6. Run the below command:

$curl -sSLk https://get.docker.com/ | sh


Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3

7. Verify the docker version:


Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3

8. Let us try searching for Docker images present in Dockerhub based on aarch64:


Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3

Please be aware that the usual Docker containers are not going to work for this architecture. You need to pick up AARCH64 bit Docker images to run containers.

linux:~ # docker run busybox

Unable to find image ‘busybox:latest’ locally

latest: Pulling from library/busybox

557a0c95bfcd: Pull complete

Digest: sha256:ae007bdb45fc0d56e3d705b97640ac24844bcc9ce4c8b8493f216a57ab6af0d5

Status: Downloaded newer image for busybox:latest

panic: standard_init_linux.go:175: exec user process caused “exec format error” [recovered]

panic: standard_init_linux.go:175: exec user process caused “exec format error”

goroutine 1 [running, locked to thread]:

panic(0x7bcaa0, 0x4820161ce0)


Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3

Installing Docker 1.13 on 64-bit ARM OS:

Docker doesn’t officially support AARCH64 system. You can’t use one-liner command to install Engine 1.13 as shown below:


Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3

If you really want to try 1.13, the easier way is downloading it from the below link:


Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3

Installing docker-compose

linux:~ # zypper install python-pip

linux:~ # pip install docker-compose


Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3
Tested docker-compose v2.0 functionality by bringing up microservices and it went fine.
Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3

Testing Swarm Mode:


Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3
Test-Drive Docker 1.12 on first 64-bit ARM OpenSUSE running on Raspberry Pi 3

linux:~/collabnix # docker service ls

ID NAME REPLICAS IMAGE COMMAND

0x7dlmr4pjm7 backend-db 1/1 aarch64/redis

linux:~/collabnix # docker service ps backend-db

ID NAME IMAGE NODE DESIRED STATE CURRENT STATE ERROR

7jmkwcbzq8wix3umfkcqc92rw backend-db.1 aarch64/redis linux Running Preparing about a minute ago


Viewing all articles
Browse latest Browse all 11063

Trending Articles