Install Ubuntu 20.04 in virtual box on windows10 and build a development environment using docker

You have a hard time building an environment. If you have a hard time, I think you will search for a solution. I am indebted to various articles, so I also left a memo of environment construction I will leave some useful information.

I used to use Ubuntu 18.04, Ubuntu 20.04 was also released about half a year ago, so I'm thinking of migrating. This time I will try a docker development environment using vscode's remote-container that does not pollute the local as much as possible. If it is difficult to use, you can change it. I want to get used to docker.

Construction contents, goals

Access the docker container from vscode, set up a web server, and if you can access it, you're done. Do it on windows 10. Please prepare the virtual box in advance.

The following installation procedure will be introduced.

procedure

The explanation is given in the following order.

--Ubuntu20.04 installation --docker installation --chrome installation --vscode installation

Ubuntu 20.04 installation

Let's take a look at this article! !! (First-hand round throw) → Install Ubuntu 20.04 in VirtualBox on Windows 10 The installation procedure with a diagram is introduced. It's work-level quality. .. ~~ (I want to use it in the procedure manual) ~~ Isn't LGTM insufficient? ??

I will introduce what I did other than the above articles.

Copy and Paste

Make "Device"-> "Clipboard sharing" and "Drag & drop" of virtual box bidirectional. Something will progress. You can also set a shared folder from "Device".

Directory name in English

It's stressful to mix Japanese words such as "download" and "desktop" on the terminal. I don't want to hit it, so I'll change it. Do you want to change it by executing the following command? Will pop up, so let's agree.

LANG=C xdg-user-dirs-gtk-update

docker installation

Previously, I put docker-ce according to the formula. Official URL: https://docs.docker.com/engine/install/debian/

This time I tried using a package called docker.io that ubuntu maintains. I am very happy because there are few commands.

sudo apt install docker.io
sudo gpasswd ${USER} docker #You can execute docker command without sudo
su ${USER} #Updated group information. I rebooted with reboot

chrome install

Download from the official website and install. A screen appears that seems to install without dropping the file, I can't get angry with ubuntu software.

Official URL https://www.google.com/intl/ja_jp/chrome/

Reference URL [Illustrated] Google Chrome installation procedure on Ubuntu Desktop 20.04 LTS

vscode installation

Download from the official website and install. There is also a screen that seems to be able to install without dropping the file, I can't get angry with ubuntu software. There is a cloud version of VScode.

Official URL https://azure.microsoft.com/ja-jp/products/visual-studio-code/

vscode plugin

I was able to search from the plugin button. Only the ones that will be used immediately for the time being. ..

I think we will add git-related and html-related plugins in the future. ..

Development environment

I will try container development using remote-container that I was interested in. It's a function added around June 2019. More than a year ago. .. All you have to do is practice the official tutorial. I used the one in python, but there are tutorials in various languages.

Official URL [https://github.com/microsoft/vscode-remote-try-python#things-to-try](https://github.com/microsoft/vscode-remote-try-python#things-to- try)

procedure

  1. Clone the repository. Git clone https://github.com/microsoft/vscode-remote-try-python.git
  2. Press F1 or ctrl + shift + p. Select the Remote-Containers: Open Folder in Container ... command.
  3. Select the cloned folder and after a while, the container will be created. When you open the terminal, it is in the container.
  4. Run python -m flask run --port 9000 --no-debugger --no-reload.
  5. Specify localhost: 9000 with google chrome and check html.

Execution is completed for the time being. Please refer to README.md on github for the continuation when executing the tutorial. ..

in conclusion

Installation did not stumble at all. There are many articles thanks to the recent output culture, but the articles you are looking for can be difficult to find or buried. I think I was able to introduce a good article that is easier to understand in this article.

The docker development environment looks good. Why is vscode free? .. However, I think that I want a local environment for things that I use frequently ← Is it also a merit that there is no need to switch venv? It will take some time to start up for the first time, but it will be reused from the next time onwards. I have to try docker-compose and github integration. .. There was alpine in images, but the python container was debian. What are you doing with alpine?

We hope for your reference. Thank you very much.

Recommended Posts

Install Ubuntu 20.04 in virtual box on windows10 and build a development environment using docker
Build a browser test environment using Capybara in the Docker development environment
Build and install Wireshark Development Release (3.3.1) on Ubuntu
Let's install Docker on Windows 10 and create a verification environment for CentOS 8!
Easily build Redmine on Windows using WSL2 and Docker
Install Rust in WSL2 Ubuntu environment and build WASM build environment
Try to build a Java development environment using Docker
Build a Doker-based development environment on Windows 10 Home 2020 ver. Part 1 Until WSL2-based Docker build
A memo when building a Rails 5.2 development environment using Docker Desktop + WSL2 on Windows 10 Home
Install docker and docker-compose on ubuntu in the shortest process
Build a XAMPP environment on Ubuntu
How to quit Docker for Mac and build a Docker development environment with Ubuntu + Vagrant
Build Unity development environment on docker
Configuration script for using docker in proxy environment on ubuntu 20.04.1
Build a development environment where Ruby on Rails breakpoints work on Windows
How to install the language used in Ubuntu and how to build the environment
Install Rails in the development environment and create a new application
Create a development environment for Ruby 3.0.0 and Rails 6.1.0 on Ubuntu 20.04.1 LTS
Install Docker on Ubuntu and set up remote connection using tls
Build a PureScript development environment with Docker
Use docker in proxy environment on ubuntu 20.04.1
[Ruby] Building a Ruby development environment on Ubuntu
Build a Java development environment on Mac
Build a Wordpress development environment with Docker
Build an Ultra96v2 development environment on Docker 1
Build a simple Docker + Django development environment
How to build a Ruby on Rails environment using Docker (for Docker beginners)
I tried to build a Firebase application development environment with Docker in 2020
[Copy and paste] Build a Laravel development environment with Docker Compose Part 2
How to build a Ruby on Rails development environment with Docker (Rails 6.x)
[Copy and paste] Build a Laravel development environment with Docker Compose Participation
How to build a Ruby on Rails development environment with Docker (Rails 5.x)
Template: Build a Ruby / Rails development environment with a Docker container (Ubuntu version)
Just install Laravel8 on docker in PHP8 environment
Build a WordPress development environment quickly with Docker
[Java] Build Java development environment on Ubuntu & check execution
Build a DHCP and NAT router on Ubuntu 16.04
Build a simple Docker Compose + Django development environment
A reminder of Docker and development environment construction
Build a development environment for Docker, java, vscode
How to build a Pytorch environment on Ubuntu
Build a Docker-based development environment on Windows 10 Home 2020 ver. Part 2 VS Code should make the Docker development environment comfortable
Build a web application development environment that uses Java, MySQL, and Redis with Docker CE for Windows
Build a development environment to create Ruby on Jets + React apps with Docker
Create a Java development environment using jenv on Mac
Build a Ruby on Rails development environment on AWS Cloud9
I built an Ubuntu environment on Windows 10 using WSL2.
Build Docker + Laravel PHP + Vue.js development environment in 5 minutes
[Note] Build a Python3 environment with Docker in EC2
Command memo to install xeyes in ubuntu docker environment
[2021] Build a Docker + Vagrant environment for using React / TypeScript
Until you build a Nuxt.js development environment with Docker and touch it with VS Code
[Rails] [Docker] Copy and paste is OK! How to build a Rails development environment with Docker
Build a local development environment for Open Distro for Elasticsearch with multiple nodes using Docker
Install Docker on Windows 10 PRO
Install Docker on Ubuntu Server 20.04
Ubuntu on Windows build speed
Ruby ① Build a Windows environment
Install / run a standalone robot simulator in wsl2 / docker environment!
Difficulties in building a Ruby on Rails environment (Windows 10) (SQLite3)
[Docker] Build a site on Hugo and publish it on GitHub