Build an Ubuntu server with Docker
Install with Ubuntu Snap
I recommend you start with 8GB memory.
- Start by downloading Ubuntu 18.04 LTS.
- Boot the server using the downloaded Ubuntu software.
- Choose your Language.
- Select Update to the new installer, to use the latest version of the installer.
- Select your Keyboard layout.
- Confirm that at least one Network connection is configured properly.
- You can typically leave Proxy address as blank.
- You can leave the default Mirror address.
- Select Use an entire disk for storage.
- Click Done, to confirm your Storage configuration, and click Continue to confirm your selection.
- Enter the following details:
- Your name: (e.g. Steven Pryer)
- Your server's name: (e.g. ubuntu-docker)
- Pick a username: (e.g. steven)
- Choose a password:
- Select the option to Install OpenSSH server, so that you can remotely access your server.
- From the list of Featured Server Snaps, select docker.
The installation will now be processed, and will typically take about a minute. Click Reboot when it's finished. Ubuntu will now take a few minutes to deploy itself with Docker.
Standard Install Docker
This is the traditional way to install Docker, and will get you a more recent version installed. Install Ubuntu as above, but skip the last step.
Start by installing the dependencies
$ sudo apt-get update $ sudo apt-get install apt-transport-https ca-certificates curl gnupg-agent software-properties-common
Now install the Docker GPG key
$ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
Check you have the right GPG key
$ sudo apt-key fingerprint 0EBFCD88
Add the latest stable Docker repository
$ sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
$ sudo apt-get update
Install the Docker Engine
$ sudo apt-get install docker-ce docker-ce-cli containerd.io
Docker is now installed. Run the following command to check which version you are running.
$ sudo docker --version
Here are some initial configurations that you might make to your fresh Docker install.
Thanks for visiting.