Start the docker journey on Raspberry Pi in four simple steps

Source: Internet
Author: User
Tags arch linux
After this blog post is published, it should be my first translation. The translation may not be in place. I hope you can cut it down.

Link: http://resin.io/blog/docker-on-raspberry-pi-in-4-simple-steps/


The following is the body of the article


Update: we have released docker 0.7.2 under arm. Click to read more

A week ago, we released the relevant tutorials on installing docker on Raspberry Pi, so everyone was excited and reported many problems, such as the installation process was troublesome, some of them also said, "Why not provide an image directly?"

Based on the feedback, we read our selection and made a difficult decision based on the following two reasons (not to provide a complete hard disk image): first, A user who has installed arch Linux must erase his existing system. Secondly, every time arch Linux or docker releases a new image, we have to repeat this process (image production ). On the contrary, we refactored and packed the key components, and simplified the installation process in The Last One Hundred Steps to four simple steps.

Step 3 is a simple command line installation method. What does it do? It's easy. He downloads a series of packages we put on GitHub to your machine and installs them. There aren't many packages, just right.


Simplified steps

1. Insert the SD card and install arch Linux on the SD card.
2. start your Raspberry Pi, find its IP address (how to set the [set Raspberry Pi IP address]), and log on to the root account through SSH. The default root password of arch Linux is root, if you have modified the root password, use the modified root password.
3. Execute the following command:
curl https://raw.github.com/resin-io/docker-install-script/master/install.sh | sh

4. Restart your Raspberry Pi and enjoy the docker on Raspberry Pi!


Docker usage on Raspberry Pi
Once you have completed the installation of docker, you should think about what to do immediately instead of enjoying it. Further work includes installing a basic image. For this step, we have released resin/RPI-raspbian. Here you can start using docker directly in your Raspberry Pi:
1. Start a docker daemon:
docker -d &
2. Enable IPv4 forwarding:
sysctl -w net.ipv4.ip_forward=1
3. Download the basic image and enable the shell terminal:
docker run -t -i resin/rpi-raspbian /bin/bash

Download the docker sample project
We created a sample project that can be packaged in a docker container [Google's coder project] (http://googlecreativelab.github.io/coder/). To run it, exit from the shell in the previous steps, run the following command:
docker run -d -p 8081:8081 resin/rpi-google-coder

After executing the preceding command, you can enter https: // <Raspberry Pi IP address>: 8081 in your browser to start hacking. Don't forget to use HTTPS secure links. normal HTTP connections will be suspended by Google coder.


How to Make dockerfiles run on Raspberry Pi
We have released a basic raspbian image. Because most of the dockerfiles are based on Ubuntu images, raspbian is still very similar to ubuntu (here we will note: ubuntu is a derivative version of Debian Linux, and raspbian is a customized version of Debian for Raspberry Pi, so you can imagine whether it is similar ), basically, you only need to change the command "from Ubuntu" to "from resin/RPI-raspbian" and then build it. If this modification is invalid, it should be because your dockerfiles has a small problem. I hope you can overcome this problem and then create a Raspberry Pi image.

Because the image for the X86-64 bit cannot work smoothly on Raspberry Pi (the CPU architecture and instruction set are different, I will not repeat it here), and vice versa, we will ask you if you want to create a new image for Raspberry Pi. You can use RPI-\ * as the prefix so that others can see it clearly. At the same time, we also hope that the docker team can provide more native support for different systems, but now, this is enough.

What to do next
We are proud to be able to run docker on your Raspberry Pi in a super simple way, and we are confident that docker has great potential in the embedded field, it may even have more potential than it is on the cloud. We also hope to see Raspberry Pi's exclusive image in the official docker index.

With this milestone completed, our resin. Io team's focus will be focused on fully preparing the alpha version of resin. IO: the product in February, which should be just before Christmas. We will also write more articles about resin. Io and the ideas behind it, hoping to answer some sudden questions, such as "well, what is resin. io ?".

We also hope to hear from readers about our development direction and the various suggestions on the potential application of our products. Please contact us.

Start the docker journey on Raspberry Pi in four simple steps

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.