-
Notifications
You must be signed in to change notification settings - Fork 1
Host
-
Download the Ubuntu OS image
- Go to the site
https://ubuntu.com/download/desktop, find the latest version of Ubuntu, and download it to thesgoinfrefolder.
- Go to the site
-
Create VM
-
Open VirtualBox, click on
NEW, and fill in the details as below:Name:
InceptionFolder:/home/username/sgoinfreISO image:select the .iso image from sgoinfre -
Click
NEXTand fill in the following:Username:
username
Password:password
Hostname:Inception -
Set the RAM and CPU cores as follows:
Base Memory:
4096MB(4GB)
Processors:4 -
Select
Create a Virtual Hard Disk nowand configure it as follows:Disk Size:
20GB -
Click
NEXTto finish creating the VM.
-
-
Install Ubuntu on VM
-
Click on the created VM to start it and wait for the graphical interface to display the installation window.
-
In the installation window, configure as follows, always clicking
NEXTto move to the next screen (the settings not mentioned below should remain as default):Language:
Portuguese (Brazil)
Keyboard Layout:English (US)
Internet Connection:Do not connect at this time
Installer Update:Skip
What do you want to do:Install
Installation Mode:Interactive
Apps to install:Default
Install Recommended Proprietary:Do not select
Disk Partitioning:Erase everything and start from scratch -
Set up your account as follows:
Your Name:
YourName
Your Computer's Name:nickname
Username:username
Password:password
-
-
Configure Guest Additions
This is necessary for copying text from the physical machine to the virtual machine-
Within the VM, open the terminal and update your existing package list with the command:
sudo apt update
-
Still in the terminal, install the bzip2 package with the command:
sudo apt install bzip2
-
After bzip2 is installed, update again with the command:
sudo apt update
-
Next, install essential software compilation packages like make and gcc with the command below:
sudo apt install build-essential gcc make perl
-
Within the VM, click
Devicesin the top menu. -
Select
Insert Guest Additions CD image. -
Click on the new CD icon that appeared on the left, and click
Run Software. -
Restart the VM with:
sudo reboot
-
When the VM restarts, click
Devicesin the top menu. -
Select the option
Upgrade Guest Additions. -
Restart your VM again with:
sudo reboot
-
-
Install Docker on the VM
Original Tutorial-
Update your existing package list with the command:
sudo apt update
-
Install some prerequisite packages that allow apt to use packages over HTTPS with the command:
sudo apt install apt-transport-https ca-certificates curl software-properties-common
-
Add the GPG key for Docker’s official repository to your system with the command:
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add - -
Add the Docker repository to APT sources with the command:
sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable" -
Update the package database with Docker packages from the newly added repository:
sudo apt update
-
Make sure you are about to install from the Docker repository instead of the default Ubuntu repository with the command:
apt-cache policy docker-ce
Expected output
docker-ce: Installed: (none) Candidate: 5:19.03.9~3-0~ubuntu-focal Version table: 5:19.03.9~3-0~ubuntu-focal 500 500 https://download.docker.com/linux/ubuntu focal/stable amd64 Packages -
Install Docker with the command:
sudo apt install docker-ce
-
Verify that the service is active with the command:
sudo systemctl status docker
Expected output:
● docker.service - Docker Application Container Engine Loaded: loaded (/lib/systemd/system/docker.service; enabled; vendor preset: enabled) Active: active (running) since Tue 2020-05-19 17:00:41 UTC; 17s ago TriggeredBy: ● docker.socket Docs: https://docs.docker.com Main PID: 24321 (dockerd) Tasks: 8 Memory: 46.4M CGroup: /system.slice/docker.service └─24321 /usr/bin/dockerd -H fd:// --containerd=/run/containerd/containerd.sock -
Configure the non-root user to allow them to run Docker with the command:
sudo usermod -aG docker ${USER} -
Restart the VM with the command:
sudo reboot
-
Verify that the user has been added to the docker group correctly with the command:
groups ${USER}
-
-
Install Docker-compose on the VM
-
Install Docker-compose on the VM with the following command:
sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose -
Change the execution permissions so that compose can be used by the non-root user:
sudo chmod +x /usr/local/bin/docker-compose
-
Verify that Docker-compose was installed correctly on the VM with the command:
docker-compose --version
-
Now that the host has been created, we can access it and start building our project.
⏮️ Previous
Next ⏭️