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.
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.
The explanation is given in the following order.
--Ubuntu20.04 installation --docker installation --chrome installation --vscode 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.
Make "Device"-> "Clipboard sharing" and "Drag & drop" of virtual box bidirectional. Something will progress. You can also set a shared folder from "Device".
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
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
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
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/
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. ..
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)
Git clone https://github.com/microsoft/vscode-remote-try-python.git
Remote-Containers: Open Folder in Container ...
command.python -m flask run --port 9000 --no-debugger --no-reload
.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. ..
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