Skip to content

Commit afef955

Browse files
author
Misty Stanley-Jones
authored
Linux installation improvements (docker#1560)
1 parent 81d21e9 commit afef955

12 files changed

Lines changed: 109 additions & 865 deletions

File tree

_data/toc.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ toc:
5252
- path: /engine/installation/linux/fedora/
5353
title: Fedora
5454
- path: /engine/installation/linux/debian/
55-
title: Debian
55+
title: Debian or Raspbian
5656
- path: /engine/installation/linux/oracle/
5757
title: Oracle Linux
5858
- path: /engine/installation/linux/suse/

engine/installation/binaries.md

Lines changed: 18 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,10 @@ title: Install Docker from binaries
88
> a dynamically-linked Docker package for your Linux distribution.
99
1010
If you want to try Docker or use it in a testing environment, but you're not on
11-
a supported platform, you can try installing from static binaries.
12-
**This is strongly discouraged in production environments.**
11+
a supported platform, you can try installing from static binaries. If possible,
12+
you should use packages built for your operating system, and use your operating
13+
system's package management system to manage Docker installation and upgrades.
14+
Be aware that 32-bit static binary archives do not include the Docker daemon.
1315

1416
Static binaries for the Docker daemon binary are only available for Linux (as
1517
`dockerd`) and Windows Server 2016 or Windows 10 (as `dockerd.exe`). Static
@@ -38,7 +40,11 @@ meets the prerequisites:
3840
[#3485](https://github.com/docker/docker/issues/3485),
3941
[#4568](https://github.com/docker/docker/issues/4568)).
4042

41-
#### Enable AppArmor and SELinux when possible
43+
#### Secure your environment as much as possible
44+
45+
##### OS considerations
46+
47+
Enable SELinux or AppArmor if possible.
4248

4349
It is recommended to use AppArmor or SELinux if your Linux distribution supports
4450
either of the two. This helps improve security and blocks certain
@@ -50,6 +56,14 @@ instructions for enabling and configuring AppArmor or SELinux.
5056
> work-around to make Docker or its containers run. Instead, configure it
5157
> correctly to fix any problems.
5258
59+
##### Docker daemon considerations
60+
61+
- Enable `seccomp` security profiles if possible. See
62+
[Enabling `seccomp` for Docker](/engine/security/seccomp.md).
63+
64+
- Enable user namespaces if possible. See the
65+
[Daemon user namespace options](/engine/reference/commandline/dockerd/#/daemon-user-namespace-options).
66+
5367
### Install static binaries
5468

5569
1. Download the static binary archive. You can download either the latest
@@ -85,7 +99,6 @@ instructions for enabling and configuring AppArmor or SELinux.
8599

86100
If you need to start the daemon with additional options, modify the above
87101
command accordingly.
88-
>>>>>>> c02c644... Rewrite and reorganize Linux install instructions
89102

90103
5. Verify that Docker is installed correctly by running the `hello-world`
91104
image.
@@ -143,7 +156,7 @@ The macOS binary includes the Docker client only. It does not include the
143156
container runs, it prints an informational message and exits.
144157

145158

146-
## Install server and binaries on Windows
159+
## Install server and client binaries on Windows
147160

148161
You can install Docker from binaries on Windows Server 2016 or Windows 10.
149162

engine/installation/linux/centos.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ the package name `docker` instead of `docker-engine`. If you installed this
2323
version of Docker, remove it using the following command:
2424

2525
```bash
26-
$ sudo yum -y remove docker
26+
$ sudo yum -y remove docker docker-common container-selinux
2727
```
2828

2929
You may also have to remove the package `docker-selinux` which conflicts with
3030
the official `docker-engine` package. Remove it with the following command:
31-
31+
3232
```bash
3333
$ sudo yum -y remove docker-selinux
3434
```
@@ -77,8 +77,8 @@ Docker from the repository.
7777

7878
3. **Optional**: Enable the **testing** repository. This repository is included
7979
in the `docker.repo` file above but is disabled by default. You can enable
80-
it alongside the stable repository. Do not use unstable repositories on
81-
on production systems or for non-testing workloads.
80+
it alongside the stable repository. **Do not use unstable repositories on
81+
on production systems or for non-testing workloads.**
8282

8383
> **Warning**: If you have both stable and unstable repositories enabled,
8484
> installing or updating without specifying a version in the `yum install`

engine/installation/linux/debian.md

Lines changed: 52 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,10 @@
11
---
22
description: Instructions for installing Docker on Debian
3-
keywords: Docker, Docker documentation, requirements, apt, installation, debian, install, uninstall, upgrade, update
3+
keywords: Docker, Docker documentation, requirements, apt, installation, debian, raspbian, install, uninstall, upgrade, update
44
redirect_from:
55
- /engine/installation/debian/
6-
title: Get Docker for Debian
6+
- /engine/installation/linux/raspbian/
7+
title: Get Docker for Debian or Raspbian
78
---
89

910
To get started with Docker on Debian, make sure you
@@ -14,10 +15,11 @@ To get started with Docker on Debian, make sure you
1415

1516
### OS requirements
1617

17-
To install Docker, you need the 64-bit version of one of these Debian versions:
18+
To install Docker, you need the 64-bit version of one of these Debian or
19+
Raspbian versions:
1820

1921
- Stretch (testing)
20-
- Jessie 8.0 (LTS)
22+
- Jessie 8.0 (LTS) / Raspbian Jessie
2123
- Wheezy 7.7 (LTS)
2224

2325
#### Extra steps for Wheezy 7.7
@@ -34,16 +36,6 @@ To install Docker, you need the 64-bit version of one of these Debian versions:
3436
- Enable the `backports` repository. See the
3537
[Debian documentation](https://backports.debian.org/Instructions/){: target="_blank" class"_"}.
3638

37-
### Recommended extra packages
38-
39-
You need `curl` if you don't have it.
40-
41-
```bash
42-
$ sudo apt-get update
43-
44-
$ sudo apt-get install curl
45-
```
46-
4739
## Install Docker
4840

4941
You can install Docker in different ways, depending on your needs:
@@ -74,27 +66,29 @@ Docker from the repository.
7466
**Jessie or Stretch**:
7567

7668
```bash
77-
$ sudo apt-get install apt-transport-https \
78-
ca-certificates \
79-
software-properties-common
69+
$ sudo apt-get install -y --no-install-recommends
70+
apt-transport-https \
71+
ca-certificates \
72+
curl \
73+
software-properties-common
8074
```
8175

8276
**Wheezy**:
8377

8478
```bash
85-
$ sudo apt-get install apt-transport-https \
86-
ca-certificates \
87-
python-software-properties
79+
$ sudo apt-get install -y --no-install-recommends \
80+
apt-transport-https \
81+
ca-certificates \
82+
curl \
83+
python-software-properties
8884
```
8985

9086
2. Add Docker's official GPG key:
9187
9288
```bash
93-
$ curl -fsSL https://yum.dockerproject.org/gpg | sudo apt-key add -
89+
$ curl -fsSL https://apt.dockerproject.org/gpg | sudo apt-key add -
9490
```
9591
96-
> **Note**: The URL is correct, even for Linux distributions that use `APT`.
97-
9892
Verify that the key ID is `58118E89F3A912897C070ADBF76221572C52609D`.
9993
10094
```bash
@@ -105,20 +99,32 @@ Docker from the repository.
10599
uid Docker Release Tool (releasedocker) <docker@docker.com>
106100
```
107101
108-
3. Use the following command to set up the **stable** repository. To also
109-
enable the **testing** repository, add the words `testing` after `main` on
110-
the last line.
111-
**Do not use these unstable repositories on production systems or for non-testing workloads.**
102+
3. Use the following command to set up the **stable** repository.
112103
113-
```bash
114-
$ sudo add-apt-repository \
115-
"deb https://apt.dockerproject.org/repo/ \
116-
debian-$(lsb_release -cs) \
117-
main"
118-
```
104+
> **Note**: The `lsb_release -cs` sub-command below returns the name of your
105+
> Debian distribution, such as `jessie`.
106+
107+
- **Debian**:
108+
109+
```bash
110+
$ sudo add-apt-repository \
111+
"deb https://apt.dockerproject.org/repo/ \
112+
debian-$(lsb_release -cs) \
113+
main"
114+
```
119115
120-
To disable the `testing` repository, you can edit `/etc/apt/sources.list`
121-
and remove the word `testing` from the appropriate line in the file.
116+
- **Raspbian**:
117+
118+
```bash
119+
$ sudo add-apt-repository \
120+
"deb https://apt.dockerproject.org/repo/ \
121+
raspbian-$(lsb_release -cs) \
122+
main"
123+
```
124+
125+
To enable the `testing` repository, you can edit `/etc/apt/sources.list`
126+
and add the word `testing` after `main` on the appropriate line of the file.
127+
**Do not use unstable repositories on production systems or for non-testing workloads.**
122128
123129
#### Install Docker
124130
@@ -166,7 +172,11 @@ Docker from the repository.
166172
$ sudo apt-get -y install docker-engine=<VERSION_STRING>
167173
```
168174
169-
The Docker daemon starts automatically.
175+
On Debian, the Docker daemon starts automatically. On Raspbian, start Docker:
176+
177+
```bash
178+
$ sudo service docker start
179+
```
170180
171181
4. Verify that `docker` is installed correctly by running the `hello-world`
172182
image.
@@ -197,7 +207,7 @@ a new file each time you want to upgrade Docker.
197207

198208
1. Go to [https://apt.dockerproject.org/repo/pool/main/d/docker-engine/](https://apt.dockerproject.org/repo/pool/main/d/docker-engine/)
199209
and download the `.deb` file for the Docker version you want to install and
200-
for your version of Debian.
210+
for your version of Debian or Raspbian.
201211

202212
> **Note**: To install a testing version, change the word `main` in the
203213
> URL to `testing`. Do not use unstable versions of Docker in production
@@ -210,7 +220,11 @@ a new file each time you want to upgrade Docker.
210220
$ sudo dpkg -i /path/to/package.deb
211221
```
212222

213-
The Docker daemon starts automatically.
223+
On Debian, the Docker daemon starts automatically. On Raspbian, start Docker:
224+
225+
```bash
226+
$ sudo service docker start
227+
```
214228

215229
3. Verify that `docker` is installed correctly by running the `hello-world`
216230
image.

engine/installation/linux/fedora.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,10 +26,10 @@ the package name `docker` instead of `docker-engine`. If you installed this vers
2626
of Docker, remove it using the following command:
2727

2828
```bash
29-
$ sudo dnf -y remove docker
29+
$ sudo dnf -y remove docker docker-common container-selinux
3030
```
3131

32-
You may also have to remove the package `docker-selinux` which conflicts with the
32+
You may also have to remove the package `docker-selinux` which conflicts with the
3333
official `docker-engine` package. Remove it with the following command:
3434

3535
```bash
@@ -81,8 +81,8 @@ Docker from the repository.
8181

8282
3. **Optional**: Enable the **testing** repository. This repository is included
8383
in the `docker.repo` file above but is disabled by default. You can enable
84-
it alongside the stable repository. Do not use unstable repositories on
85-
on production systems or for non-testing workloads.
84+
it alongside the stable repository. **Do not use unstable repositories on
85+
on production systems or for non-testing workloads.**
8686

8787
> **Warning**: If you have both stable and unstable repositories enabled,
8888
> updating without specifying a version in the `dnf install` or `dnf update`

engine/installation/linux/oracle.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -94,8 +94,8 @@ Docker from the repository.
9494

9595
3. **Optional**: Enable the **testing** repository. This repository is included
9696
in the `docker.repo` file above but is disabled by default. You can enable
97-
it alongside the stable repository. Do not use unstable repositories on
98-
on production systems or for non-testing workloads.
97+
it alongside the stable repository. **Do not use unstable repositories on
98+
on production systems or for non-testing workloads.**
9999

100100
> **Warning**: If you have both stable and unstable repositories enabled,
101101
> installing or updating without specifying a version in the `yum install`

engine/installation/linux/other.md

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ distributions. These instructions are not regularly tested. Consider
1010
- [Installation on Arch Linux](/engine/installation/linux/archlinux.md)
1111
- [Installation on CRUX Linux](/engine/installation/linux/cruxlinux.md)
1212
- [Installation on Gentoo Linux](/engine/installation/linux/gentoolinux.md)
13-
- [Installation on Raspbian Linux](/engine/installation/linux/raspbian.md)
1413

1514
## Next steps
1615

0 commit comments

Comments
 (0)