Skip to content
This repository was archived by the owner on Jul 20, 2023. It is now read-only.

Commit 164f93b

Browse files
authored
Merge pull request #4 from loftwah/master
Adding a snippet on how to install Docker-CE nix
2 parents 39d5e53 + 3666883 commit 164f93b

File tree

1 file changed

+32
-0
lines changed

1 file changed

+32
-0
lines changed

source/snippets/dockerce-ubuntu.md

+32
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
extends: _layouts.documentation
2+
section: content
3+
title: Install Docker-CE on Ubuntu Linux 18.04
4+
description: A useful snippet that shows how to install Docker-CE on Ubuntu and also my first Open Source contribution!
5+
6+
# Install Docker-CE on Ubuntu Linux 18.04 (should be the same for most current versions)
7+
8+
```shell
9+
# Update the apt package list.
10+
sudo apt-get update -y
11+
# Install Docker's package dependencies.
12+
sudo apt-get install -y \
13+
apt-transport-https \
14+
ca-certificates \
15+
curl \
16+
software-properties-common
17+
# Download and add Docker's official public PGP key.
18+
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
19+
# Verify the fingerprint.
20+
sudo apt-key fingerprint 0EBFCD88
21+
# Add the `stable` channel's Docker upstream repository.
22+
sudo add-apt-repository \
23+
"deb [arch=amd64] https://download.docker.com/linux/ubuntu \
24+
$(lsb_release -cs) \
25+
stable"
26+
# Update the apt package list (for the new apt repo).
27+
sudo apt-get update -y
28+
# Install the latest version of Docker CE.
29+
sudo apt-get install -y docker-ce
30+
# Allow your user to access the Docker CLI without needing root access.
31+
sudo usermod -aG docker $USER
32+
```

0 commit comments

Comments
 (0)