I tried to create an Ubuntu environment using Docker on Mac.
The motivation for writing articles is
It will be 3 points.
As a caveat, this time I created this kind of environment for scraping using Selenium + PhantomJS, but the version of Ubuntu is old because the references are old.
It is divided into the first half and the second half. In the first half, we will install Docker and install the Ubuntu image on Docker (it will be over soon). After that, I will give you an overview of Ubuntu. In the second half, we will improve the Ubuntu environment. If you are not interested in the overview of Linux and Ubuntu, please skip it.
The last time I tried to install Docker on Windows, I got stuck because I couldn't put Docker in my Windows Home, but this time it's a revenge on my Mac (because my PC wasn't working well). New). It seems that Docker can be used on Windows Home recently, so if you want to do it, you can do it on Windows Home as well. I think it is possible to charge for Windows Pro (you need to charge about 10,000 yen).
first half
Reference book
Install Docker for Mac
In order to install Docker, you need to create an account on the official website (not limited to Docker). After creating an account, download it from Docker Hub and install it.
$docker
If there is no error, it is ok.
reference Install Docker on Mac (Update: 2019/7/13)
Next, install the Ubuntu image on Docker.
#Introducing Ubuntu image to Docker
$docker pull ubuntu16.04
#Run Ubuntu and log in to the shell
$docker run -it ubuntu:16.04
Only this. Easy.
I'm new to Ubuntu, so I'll start with an overview of Ubuntu.
In the first place, it will be long from the story of Linux, so let's wash it lightly. Linux was created in 1991 by a person named Linus Torvalds. This person also made Git in 2005. I've read a few books like the history of Linux, but the story behind the birth was so interesting.
Roughly speaking, the good points of Linux are ・ Basic free ・ Highly customizable ・ Can be used as a development environment Etc. However, since I touch it for the first time, I don't feel it.
Mainly classified into 3 systems, ・ Red Hat system ・ Debian system ・ Slackware system there is. Each has its own characteristics, so it is important to use it according to the purpose.
Ubuntu is a major Linux that corresponds to the Debian system in the three major distributions of Linux. It was born in 2004, derived from Debian GNU / Linux, with the development goal of "the latest and stable OS that is easy for anyone to use". He has announced that he will release new desktops and servers every 6 months.
What is Ubuntu | Ubuntu Japanese Team [By purpose] 7 recommended Linux distributions for beginners
I posted for the first time. I had a hard time because I wasn't used to Markdown notation. Backticks (this → `) I used it for the first time. Also, since I have hardly used HTML, it was difficult to display the .svg image. I didn't pursue it very much because it deviated from the main subject, but I didn't understand the centering well.
[Markdown notation sample collection](https://qiita.com/tbpgr/items/989c6badefff69377da7#%E7%AE%87%E6%9D%A1%E6%9B%B8%E3%81%8D%E3% 83% AA% E3% 82% B9% E3% 83% 88)
It seems that Docker can be installed on Raspberry Pi as well. I often touch Raspberry Pi in my research, but I didn't know that I could put Docker in Raspberry Pi. Well, I thought that I could do it just by not thinking about it, but I was impressed again that Raspberry Pi can do anything.
I touched Ubuntu for the first time Since I usually touch Raspberry Pi, I thought I could understand Linux to some extent, but there were many commands I didn't know. The PC I had so far was Windows, the laboratory and intern were Mac, and I used Raspberry Pi for research, so I want to remember it because the commands are messed up.
Ubuntu environment on Docker vs Docker environment on Ubuntu Which is more convenient, creating an Ubuntu environment on Docker or creating a Docker environment on Ubuntu?
I like King Gnu, but I found out about the existence of a mascot called GNU.
I tried collecting mascots related to IT (Part 1)
Continue to the second half.
References [Scraping & Machine Learning with Python Development Techniques Let's Use BeautifulSoup, scikit-learn, TensorFlow](https://www.amazon.co.jp/Python%E3%81%AB%E3%82%88%E3%] 82% 8B% E3% 82% B9% E3% 82% AF% E3% 83% AC% E3% 82% A4% E3% 83% 94% E3% 83% B3% E3% 82% B0-% E9% 96 % 8B% E7% 99% BA% E3% 83% 86% E3% 82% AF% E3% 83% 8B% E3% 83% 83% E3% 82% AF-BeautifulSoup-scikit-learn-TensorFlow% E3% 82 % 92% E4% BD% BF% E3% 81% A3% E3% 81% A6% E3% 81% BF% E3% 82% 88% E3% 81% 86 / dp / 4802610793) This time I looked at the above, but a new one is out. [Supplementary revision Python scraping & machine learning development technique](https://www.amazon.co.jp/%E5%A2%97%E8%A3%9C%E6%94%B9%E8%A8%82Python% E3% 81% AB% E3% 82% 88% E3% 82% 8B% E3% 82% B9% E3% 82% AF% E3% 83% AC% E3% 82% A4% E3% 83% 94% E3% 83% B3% E3% 82% B0-% E6% A9% 9F% E6% A2% B0% E5% AD% A6% E7% BF% 92-% E9% 96% 8B% E7% 99% BA% E3% 83% 86% E3% 82% AF% E3% 83% 8B% E3% 83% 83% E3% 82% AF-% E3% 82% AF% E3% 82% B8% E3% 83% A9% E9% A3 % 9B% E8% A1% 8C% E6% 9C% BA / dp / 4802611927 / ref = pd_lpo_14_img_0 / 358-4721152-4312017? _Encoding = UTF8 & pd_rd_i = 4852611927 & pd_rd_r = 9a53db66-e7f6-4d6a-a056-4e -ebf0-4306-905a-7762d1b93740 & pf_rd_r = HVDKCV7GTEEEJQR8PC5V & psc = 1 & refRID = HVDKCV7GTEEEJQR8PC5V)
Recommended Posts