docker proxy, lazydocker

This commit is contained in:
Andrew Hurley 2022-10-27 00:39:12 +11:00
parent fd4c8457b0
commit 8c49a7e300
5 changed files with 47 additions and 0 deletions

View File

@ -15,3 +15,9 @@ echo \
sudo apt-get update sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
cat <<EOT |sudo tee /etc/docker/daemon.json
{
"registry-mirrors": ["https://cor.cherished.me"]
}
EOT
sudo systemctl restart docker

View File

@ -15,3 +15,10 @@ sudo dnf -y install dnf-plugins-core
https://download.docker.com/linux/fedora/docker-ce.repo https://download.docker.com/linux/fedora/docker-ce.repo
sudo dnf install docker-ce docker-ce-cli containerd.io docker-compose-plugin sudo dnf install docker-ce docker-ce-cli containerd.io docker-compose-plugin
cat <<EOT |sudo tee /etc/docker/daemon.json
{
"registry-mirrors": ["https://cor.cherished.me"]
}
EOT
sudo systemctl restart docker

View File

@ -15,3 +15,9 @@ echo \
sudo apt-get update sudo apt-get update
sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin sudo apt-get install -y docker-ce docker-ce-cli containerd.io docker-compose-plugin
cat <<EOT |sudo tee /etc/docker/daemon.json
{
"registry-mirrors": ["https://cor.cherished.me"]
}
EOT
sudo systemctl restart docker

4
lazydocker/install.sh Executable file
View File

@ -0,0 +1,4 @@
#!/bin/bash
DIR=/usr/bin
source install_update_linux.sh

View File

@ -0,0 +1,24 @@
#!/bin/bash
# allow specifying different destination directory
DIR="${DIR:-"$HOME/.local/bin"}"
# map different architecture variations to the available binaries
ARCH=$(uname -m)
case $ARCH in
i386|i686) ARCH=x86 ;;
armv6*) ARCH=armv6 ;;
armv7*) ARCH=armv7 ;;
aarch64*) ARCH=arm64 ;;
esac
# prepare the download URL
GITHUB_LATEST_VERSION=$(curl -L -s -H 'Accept: application/json' https://github.com/jesseduffield/lazydocker/releases/latest | sed -e 's/.*"tag_name":"\([^"]*\)".*/\1/')
GITHUB_FILE="lazydocker_${GITHUB_LATEST_VERSION//v/}_$(uname -s)_${ARCH}.tar.gz"
GITHUB_URL="https://github.com/jesseduffield/lazydocker/releases/download/${GITHUB_LATEST_VERSION}/${GITHUB_FILE}"
# install/update the local binary
curl -L -o lazydocker.tar.gz $GITHUB_URL
tar xzvf lazydocker.tar.gz lazydocker
install -Dm 755 lazydocker -t "$DIR"
rm lazydocker lazydocker.tar.gz