|
| 1 | +#!/usr/bin/env bash |
| 2 | + |
| 3 | +# Licensed to the Apache Software Foundation (ASF) under one |
| 4 | +# or more contributor license agreements. See the NOTICE file |
| 5 | +# distributed with this work for additional information |
| 6 | +# regarding copyright ownership. The ASF licenses this file |
| 7 | +# to you under the Apache License, Version 2.0 (the |
| 8 | +# "License"); you may not use this file except in compliance |
| 9 | +# with the License. You may obtain a copy of the License at |
| 10 | +# |
| 11 | +# http://www.apache.org/licenses/LICENSE-2.0 |
| 12 | +# |
| 13 | +# Unless required by applicable law or agreed to in writing, |
| 14 | +# software distributed under the License is distributed on an |
| 15 | +# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY |
| 16 | +# KIND, either express or implied. See the License for the |
| 17 | +# specific language governing permissions and limitations |
| 18 | +# under the License. |
| 19 | + |
| 20 | +set -exu -o pipefail |
| 21 | + |
| 22 | +for pkg in docker.io docker-doc docker-compose podman-docker containerd runc; do sudo apt-get remove $pkg; done |
| 23 | + |
| 24 | +sudo apt-get update |
| 25 | +sudo apt-get install ca-certificates curl gnupg |
| 26 | + |
| 27 | +sudo install -m 0755 -d /etc/apt/keyrings |
| 28 | +curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/keyrings/docker.gpg |
| 29 | +sudo chmod a+r /etc/apt/keyrings/docker.gpg |
| 30 | + |
| 31 | +echo \ |
| 32 | + "deb [arch="$(dpkg --print-architecture)" signed-by=/etc/apt/keyrings/docker.gpg] https://download.docker.com/linux/debian \ |
| 33 | + "$(. /etc/os-release && echo "$VERSION_CODENAME")" stable" | \ |
| 34 | + sudo tee /etc/apt/sources.list.d/docker.list > /dev/null |
| 35 | + |
| 36 | +sudo apt-get update |
| 37 | + |
| 38 | +sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin |
0 commit comments