Skip to content

Commit 0380a90

Browse files
committed
Updated DOCKER.md to include info on checking versions for docker and docker-compose. People are getting tripped up by installs that aren't up to date
1 parent d957356 commit 0380a90

File tree

1 file changed

+81
-0
lines changed

1 file changed

+81
-0
lines changed

DOCKER.md

Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ use the [Helm and Kubernetes](KUBERNETES.md) approach.
99
If you start your DefectDojo instance on Docker Compose for the first time, just
1010
run `docker-compose up`.
1111

12+
**NOTE:** Installing with docker-compose requires the latest version of docker and docker-compose - at least docker 18.09.4 and docker-compose 1.24.0. See "Checking Docker versions" below for version errors during running docker-compose up.
13+
1214
Navigate to <http://localhost:8080> where you can log in with username admin.
1315
To find out the admin user’s password, check the very beginning of the console
1416
output of the initializer container, typically name 'django-defectdojo_initializer_1', or run the following:
@@ -57,3 +59,82 @@ Removes all containers, networks and the database volume
5759
```zsh
5860
docker-compose down --volumes
5961
```
62+
63+
## Checking Docker versions
64+
65+
Run the following to determine the versions for docker and docker-compose:
66+
67+
```zsh
68+
$ docker version
69+
Client:
70+
Version: 17.09.0-ce
71+
API version: 1.32
72+
Go version: go1.8.3
73+
Git commit: afdb6d4
74+
Built: Tue Sep 26 22:42:45 2017
75+
OS/Arch: linux/amd64
76+
77+
Server:
78+
Version: 17.09.0-ce
79+
API version: 1.32 (minimum version 1.12)
80+
Go version: go1.8.3
81+
Git commit: afdb6d4
82+
Built: Tue Sep 26 22:41:24 2017
83+
OS/Arch: linux/amd64
84+
Experimental: false
85+
86+
$ docker-compose version
87+
docker-compose version 1.18.0, build 8dd22a9
88+
docker-py version: 2.6.1
89+
CPython version: 2.7.13
90+
OpenSSL version: OpenSSL 1.0.1t 3 May 2016
91+
```
92+
93+
In this case, both docker (version 17.09.0-ce) and docker-compose (1.18.0) need to be updated.
94+
95+
Follow [Dockers' documentation](https://docs.docker.com/install/) for your OS to get the lastest version of Docker. For the docker command, most OSes have a built-in update mechanism like "apt upgrade".
96+
97+
Docker Compose isn't packaged like Docker and you'll need to manually update an existing install if using Linux. For Linux, either follow the instructions in the [Docker Compose documentation](https://docs.docker.com/compose/install/) or use the shell script below. The script below will update docker-compose to the latest version automatically. You will need to make the script executable and have sudo privileges to upgrade docker-compose:
98+
99+
```zsh
100+
#!/bin/bash
101+
102+
# Set location of docker-compose binary - shouldn't need to modify this
103+
DESTINATION=/usr/local/bin/docker-compose
104+
105+
# Get latest docker-compose version
106+
VERSION=$(curl --silent https://api.github.com/repos/docker/compose/releases/latest | jq .name -r)
107+
108+
# Output some info on what this is going to do
109+
echo "Note: docker-compose version $VERSION will be downloaded from:"
110+
echo "https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m)"
111+
echo "Enter sudo password to install docker-compose"
112+
113+
# Download and install lastest docker compose
114+
sudo curl -L https://github.com/docker/compose/releases/download/${VERSION}/docker-compose-$(uname -s)-$(uname -m) -o $DESTINATION
115+
sudo chmod +x $DESTINATION
116+
117+
# Output new docker-compose version info
118+
echo ""
119+
docker-compose version
120+
```
121+
122+
Running the script above will look like:
123+
124+
```zsh
125+
$ vi update-docker-compose
126+
$ chmod u+x update-docker-compose
127+
$ ./update-docker-compose
128+
Note: docker-compose version 1.24.0 will be downloaded from:
129+
https://github.com/docker/compose/releases/download/1.24.0/docker-compose-Linux-x86_64
130+
Enter sudo password to install docker-compose
131+
% Total % Received % Xferd Average Speed Time Time Time Current
132+
Dload Upload Total Spent Left Speed
133+
100 617 0 617 0 0 1778 0 --:--:-- --:--:-- --:--:-- 1778
134+
100 15.4M 100 15.4M 0 0 2478k 0 0:00:06 0:00:06 --:--:-- 2910k
135+
136+
docker-compose version 1.24.0, build 0aa59064
137+
docker-py version: 3.7.2
138+
CPython version: 3.6.8
139+
OpenSSL version: OpenSSL 1.1.0j 20 Nov 2018
140+
```

0 commit comments

Comments
 (0)