File tree 2 files changed +29
-51
lines changed 2 files changed +29
-51
lines changed Original file line number Diff line number Diff line change 29
29
- name : install docker
30
30
env :
31
31
DOCKER_VERSION : ${{ matrix.docker_version }}
32
- run : |
33
- set -x
34
- sudo apt-get remove -y docker docker-engine docker.io containerd runc ||:
35
- sudo apt-get update -y
36
- sudo apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
37
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
38
- sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
39
- sudo apt-get update -y
40
- sudo apt-cache gencaches
41
- sudo apt-get install -y docker-ce=$( apt-cache madison docker-ce | grep -e $DOCKER_VERSION | cut -f 2 -d '|' | head -1 | sed 's/\s//g' )
42
- if [ $? -ne 0 ]; then
43
- echo "Error: Could not install ${DOCKER_VERSION}"
44
- echo "Available docker versions:"
45
- apt-cache madison docker-ce
46
- exit 1
47
- fi
48
- sudo systemctl start docker
32
+ run : sudo ./script/install_docker.sh
49
33
- name : spec tests
50
34
run : bundle exec rake
51
35
Original file line number Diff line number Diff line change 1
- #! /bin/bash
2
- set -ex
3
-
4
- declare -a SEMVER
5
-
6
- # argv[0]
7
- DOCKER_VERSION=$1
8
- # argv[1]
9
- DOCKER_CE=$2
10
-
11
- # disable travis default installation
12
- systemctl stop docker.service
13
- apt-get -y --purge remove docker docker-engine docker.io containerd runc
14
-
15
- # install gpg key for docker rpo
16
- curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
17
- apt-key fingerprint 0EBFCD88
18
-
19
- # enable docker repo
20
- add-apt-repository \
21
- " deb [arch=amd64] https://download.docker.com/linux/ubuntu \
22
- $( lsb_release -cs) \
23
- stable"
24
- apt-get update
25
- apt-cache gencaches
1
+ #! /bin/bash -ex
2
+
3
+ ${DOCKER_VERSION:? You must set the ' DOCKER_VERSION' environment variable}
4
+
5
+ apt-get remove -y \
6
+ docker \
7
+ docker-engine \
8
+ docker.io \
9
+ containerd \
10
+ runc
11
+
12
+ apt-get update -y
26
13
27
- set +e
28
- # install package
29
- apt-get install docker-ce=${DOCKER_VERSION}
14
+ apt-get install -y \
15
+ apt-transport-https \
16
+ ca-certificates \
17
+ curl \
18
+ gnupg-agent \
19
+ software-properties-common
20
+
21
+ curl -fsSL https://download.docker.com/linux/ubuntu/gpg | apt-key add -
22
+
23
+ add-apt-repository " deb [arch=amd64] https://download.docker.com/linux/ubuntu $( lsb_release -cs) stable"
24
+ apt-get update -y
25
+ apt-cache gencaches
26
+ apt-get install -y \
27
+ docker-ce=$( apt-cache madison docker-ce | grep -e $DOCKER_VERSION | cut -f 2 -d ' |' | head -1 | sed ' s/\s//g' )
30
28
31
29
if [ $? -ne 0 ]; then
32
30
echo " Error: Could not install ${DOCKER_VERSION} "
33
31
echo " Available docker versions:"
34
32
apt-cache madison docker-ce
35
33
exit 1
36
34
fi
37
- set -e
38
-
39
- systemctl stop docker.service
40
35
41
- echo ' DOCKER_OPTS="-H unix:///var/run/docker.sock --pidfile=/var/run/docker.pid"' > /etc/default/docker
42
- cat /etc/default/docker
36
+ systemctl start docker
43
37
44
- systemctl start docker.service
38
+ docker swarm init
You can’t perform that action at this time.
0 commit comments