switch to the deb822-style format sources

This commit is contained in:
Rui Lopes
2026-06-26 07:26:26 +00:00
parent 1503db862f
commit 3beccedca8
2 changed files with 21 additions and 6 deletions
+11 -3
View File
@@ -26,11 +26,19 @@ apt-get update
# install docker.
# see https://docs.docker.com/engine/installation/linux/docker-ce/ubuntu/#install-using-the-repository
apt-get install -y apt-transport-https software-properties-common
wget -qO- https://download.docker.com/linux/ubuntu/gpg | gpg --dearmor -o /etc/apt/keyrings/download.docker.com.gpg
echo "deb [arch=amd64 signed-by=/etc/apt/keyrings/download.docker.com.gpg] https://download.docker.com/linux/ubuntu $(lsb_release -cs) stable" >/etc/apt/sources.list.d/docker.list
wget -qO- https://download.docker.com/linux/ubuntu/gpg \
| gpg --dearmor -o /etc/apt/keyrings/download.docker.com.gpg
cat >/etc/apt/sources.list.d/docker.sources <<EOF
Types: deb
Architectures: amd64
Signed-By: /etc/apt/keyrings/download.docker.com.gpg
URIs: https://download.docker.com/linux/ubuntu
Suites: $(lsb_release -cs)
Components: stable
EOF
apt-get update
apt-cache madison docker-ce
docker_package_version="$(apt-cache madison docker-ce | awk "/$docker_version/{print \$3}")"
docker_package_version="$(apt-cache madison docker-ce | awk "/$docker_version/{print \$3}" | head -1)"
apt-get install -y "docker-ce=$docker_package_version" "docker-ce-cli=$docker_package_version" containerd.io
# configure it.
+10 -3
View File
@@ -39,12 +39,19 @@ EOF
# the best.
bash -c "while [[ -z \"\$(wget -qO- https://$nexus_domain/repository/apt-hosted/dists/noble/Release | grep '/Packages$')\" ]]; do sleep 5; done"
# import the apt-hosted key.
# import the apt-hosted repository key.
nexus_apt_hosted_keyring_path="/etc/apt/keyrings/$nexus_domain-apt-hosted.gpg"
gpg --dearmor -o "$nexus_apt_hosted_keyring_path" </vagrant/shared/apt-hosted-public.key
# configure the apt-hosted repository.
echo "deb [arch=amd64 signed-by=$nexus_apt_hosted_keyring_path] https://$nexus_domain/repository/apt-hosted noble main" >"/etc/apt/sources.list.d/$nexus_domain-apt-hosted.list"
# configure the apt-hosted repository sources.
cat >"/etc/apt/sources.list.d/$nexus_domain-apt-hosted.sources" <<EOF
Types: deb
Architectures: amd64
Signed-By: $nexus_apt_hosted_keyring_path
URIs: https://$nexus_domain/repository/apt-hosted
Suites: noble
Components: main
EOF
apt-get update
# install the hello-world package.