1 # Copyright 2020 Huawei Technologies Co., Ltd.
3 # Licensed under the Apache License, Version 2.0 (the "License");
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http://www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 - name: Check whether docker is already installed
23 msg: Docker is already present
29 - name: "Installing docker update"
30 command: apt-get update -y
35 - name: "Installing docker upgrade"
36 # yamllint disable rule:line-length
37 command: apt-get install -y apt-transport-https ca-certificates curl gnupg-agent software-properties-common
38 # yamllint disable rule:line-length
41 - name: Add repository
42 shell: curl -sL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
44 - name: "CA-Certificates"
45 # yamllint disable rule:line-length
46 shell: sudo add-apt-repository "deb [arch=arm64] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable"
47 # yamllint disable rule:line-length
53 command: apt-get update -y
58 - name: "Installed docker"
59 command: apt-get install -y docker-ce docker-ce-cli containerd.io