[PYTHON] Linux beginners create Ubuntu 16.04 environment on Docker (for Mac)-first half-

Overview

I tried to create an Ubuntu environment using Docker on Mac.

The motivation for writing articles is

  1. Summarize Linux overview for beginners
  2. Since I touched Ubuntu for the first time, a memorandum of stumbling points
  3. Last year, when I tried to put Docker in Windows Home, I spent some time (although I couldn't put it in the end), so I wanted to output it in some form.

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).

outline

first half

  1. Preparing Docker
  2. Register an account on the official website
  3. Install on Mac
  4. Install Ubuntu image on Docker
  5. Ubuntu overview
  6. Yota story

Reference book

1. Docker preparation

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.

Install Docker Desktop on Mac

$docker

If there is no error, it is ok.

reference Install Docker on Mac (Update: 2019/7/13)

2. Install Ubuntu image on Docker

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.

3. Ubuntu overview

I'm new to Ubuntu, so I'll start with an overview of Ubuntu.

3-1. Talking about Linux before 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.

image

Linux mascot Tux. Source: [Wikipedia] (https://ja.wikipedia.org/wiki/%E3%82%BF%E3%83%83%E3%82%AF%E3%82%B9)

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.

Major Linux distributions

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.

What is Ubuntu?

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

4. Yota story

  1. 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.

  2. [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)

  3. Summary of how to write Qiita Markdown

  4. Review of SVG file operations in HTML5

  5. 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.

  6. Build Docker on Raspberry Pi

  7. Run Docker on Raspberry Pi

  8. 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.

  9. Linux commands that programmers should know

  10. 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?

  11. I like King Gnu, but I found out about the existence of a mascot called GNU.

image

The mascot 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

Linux beginners create Ubuntu 16.04 environment on Docker (for Mac)-first half-
Create an environment for MkDocs on Amazon Linux (attempted)
Create a VS Code + Docker development environment on a Linux VM
Create a Linux environment on Windows 10
[Linux] Docker environment construction on Redhat
Programming environment for beginners made on Windows
Created Ubuntu, Python, OpenCV environment on Docker
Introduction to docker Create ubuntu environment in ubuntu
[Venv] Create a python virtual environment on Ubuntu
Build a Kubernetes environment for development on Ubuntu
How to build Java environment on Ubuntu (Linux)
Create a QR code for the URL on Linux
[Linux] WSL2 Build an environment for laravel7 with Ubuntu 20.04
Cross development environment (developing programs for windows on linux)
How to create a Python 3.6.0 environment by putting pyenv on Amazon Linux and Ubuntu
How to set up WSL2 on Windows 10 and create a study environment for Linux commands
Create an environment for "Deep Learning from scratch" with Docker
Linux distribution recommended for beginners
[For beginners] How to use for statements on Linux (variables, etc.)
Create command shortcuts on Ubuntu 16.04
Python3 environment construction (for beginners)
Overview of Docker (for beginners)
Install Docker on WSL Ubuntu 18.04
Linux environment construction (on WSL environment)
Linux command memorandum [for beginners]
Create a virtual environment for python on mac [Very easy]
Convenient Linux shortcuts (for beginners)
Don't ask for SSH passphrases using keychain on Ubuntu (linux)
Create a Python environment for professionals in VS Code on Windows
I tried to create an environment of MkDocs on Amazon Linux
Create an environment for Django x Apache x mod_wsgi with Vagrant (Ubuntu 16.04)
Create a development environment for Go + MySQL + nginx with Docker (docker-compose)
Create a Docker container image with JRE8 / JDK8 on Amazon Linux
It's time to install DB with Docker! DB installation for beginners on Docker
Create a USB boot Ubuntu with a Python environment for data analysis
Building a Python environment on Ubuntu
Create a Python environment on Mac (2017/4)
[For beginners] Django -Development environment construction-
Completion of docker command on Linux
Create Scratch Offline Editor for Linux
Create a python environment on centos
Frequently used Linux commands (for beginners)
[Must-see for beginners] Basics of Linux
code-server online environment (5) Launch code-server on Docker
Install confluent-kafka for Python on Ubuntu
Build Python 3.8 + Pipenv environment on Ubuntu 18.04
Introduce Python 3.5.2 environment on Amazon Linux
pykintone on Windows Subsystem for Linux
Environment construction of "Tello_Video" on Ubuntu
OpenCV3 & Python3 environment construction on Ubuntu
Procedure for building a kube environment on amazon linux2 (aws) ~ (with bonus)
Create a Python development environment locally at the fastest speed (for beginners)
Links for handling jupyter notebooks on Docker on Ubuntu on VirtualBox on macOS with SSH
Build Python3 and OpenCV environment on Ubuntu 18.04
Notes for installing Sublime Text on Ubuntu
Python virtual environment and packages on Ubuntu
How to create an NVIDIA Docker environment
Create a python environment on your Mac
Let's create a virtual environment for Python
[Linux command summary] Command list [Must-see for beginners]
[Note] Procedures for installing Ubuntu on Windows 10