Jan Wagner revisó este gist 4 years ago. Ir a la revisión
1 file changed, 1 insertion, 1 deletion
deploy_addons.sh
| @@ -1,6 +1,6 @@ | |||
| 1 | 1 | #!/bin/bash | |
| 2 | 2 | # Install docker-compose and bash completion | |
| 3 | - | COMPOSE_VER=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/docker/compose/releases | grep .tag_name | grep -oP "[0-9]+(\.[0-9]+)+" | grep "^1" | head -1) && \ | |
| 3 | + | COMPOSE_VER=$(curl -s -o /dev/null -I -w "%{redirect_url}\n" https://github.com/docker/compose/releases/latest | grep -oP "[0-9]+(\.[0-9]+)+$") && \ | |
| 4 | 4 | curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/releases/download/$COMPOSE_VER/docker-compose-$(uname -s)-$(uname -m) && \ | |
| 5 | 5 | [ -d /etc/bash_completion.d/ ] || mkdir -p /etc/bash_completion.d/ && \ | |
| 6 | 6 | curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VER}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose && \ | |
Jan Wagner revisó este gist 4 years ago. Ir a la revisión
1 file changed, 1 insertion, 1 deletion
deploy_addons.sh
| @@ -7,7 +7,7 @@ curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VER}/contrib/ | |||
| 7 | 7 | chmod +x /usr/local/bin/docker-compose && \ | |
| 8 | 8 | # Install ctop | |
| 9 | 9 | echo "deb http://packages.azlux.fr/debian/ buster main" | tee /etc/apt/sources.list.d/azlux.list && \ | |
| 10 | - | wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add - && \ | |
| 10 | + | if [ -d /etc/apt/trusted.gpg.d/ ]; then curl -fsSL https://azlux.fr/repo.gpg.key | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/azlux.gpg; else curl -fsSL https://azlux.fr/repo.gpg.key | sudo apt-key add -; fi && \ | |
| 11 | 11 | apt update && \ | |
| 12 | 12 | apt install docker-ctop && \ | |
| 13 | 13 | # Install lazydocker | |
Jan Wagner revisó este gist 4 years ago. Ir a la revisión
1 file changed, 2 insertions, 2 deletions
docker_deploy.sh
| @@ -3,9 +3,9 @@ | |||
| 3 | 3 | [ "$(lsb_release -rs)" = "testing" ] || [ "$(cat /etc/debian_version | awk -F. {'print $1'})" -ne "8" ] && echo exit 1 | |
| 4 | 4 | echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -cs) stable" > \ | |
| 5 | 5 | /etc/apt/sources.list.d/$(lsb_release -cs)-docker.list && \ | |
| 6 | - | apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0EBFCD88; \ | |
| 7 | 6 | # Install needed dependencies | |
| 8 | - | aptitude install -y apt-transport-https ca-certificates bridge-utils curl sudo; \ | |
| 7 | + | aptitude install -y apt-transport-https ca-certificates bridge-utils curl sudo && \ | |
| 8 | + | if [ -d /etc/apt/trusted.gpg.d/ ]; then curl -fsSL https://download.docker.com/linux/debian/gpg | sudo gpg --dearmor -o /etc/apt/trusted.gpg.d/docker-archive-keyring.gpg; else apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0EBFCD88; fi && \ | |
| 9 | 9 | aptitude update; \ | |
| 10 | 10 | # Install docker and enable it | |
| 11 | 11 | aptitude install -y docker-ce && \ | |
Jan Wagner revisó este gist 4 years ago. Ir a la revisión
1 file changed, 1 insertion, 1 deletion
deploy_addons.sh
| @@ -1,6 +1,6 @@ | |||
| 1 | 1 | #!/bin/bash | |
| 2 | 2 | # Install docker-compose and bash completion | |
| 3 | - | COMPOSE_VER=$(curl -s -o /dev/null -I -w "%{redirect_url}\n" https://github.com/docker/compose/releases/latest | grep -oP "[0-9]+(\.[0-9]+)+$") && \ | |
| 3 | + | COMPOSE_VER=$(curl -s -H "Accept: application/vnd.github.v3+json" https://api.github.com/repos/docker/compose/releases | grep .tag_name | grep -oP "[0-9]+(\.[0-9]+)+" | grep "^1" | head -1) && \ | |
| 4 | 4 | curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/releases/download/$COMPOSE_VER/docker-compose-$(uname -s)-$(uname -m) && \ | |
| 5 | 5 | [ -d /etc/bash_completion.d/ ] || mkdir -p /etc/bash_completion.d/ && \ | |
| 6 | 6 | curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VER}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose && \ | |
Jan Wagner revisó este gist 4 years ago. Ir a la revisión
1 file changed, 1 insertion, 1 deletion
docker_deploy.sh
| @@ -5,7 +5,7 @@ echo "deb [arch=amd64] https://download.docker.com/linux/debian $(lsb_release -c | |||
| 5 | 5 | /etc/apt/sources.list.d/$(lsb_release -cs)-docker.list && \ | |
| 6 | 6 | apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0EBFCD88; \ | |
| 7 | 7 | # Install needed dependencies | |
| 8 | - | aptitude install -y apt-transport-https ca-certificates bridge-utils curl; \ | |
| 8 | + | aptitude install -y apt-transport-https ca-certificates bridge-utils curl sudo; \ | |
| 9 | 9 | aptitude update; \ | |
| 10 | 10 | # Install docker and enable it | |
| 11 | 11 | aptitude install -y docker-ce && \ | |
Jan Wagner revisó este gist 4 years ago. Ir a la revisión
1 file changed, 1 insertion, 1 deletion
deploy_addons.sh
| @@ -6,7 +6,7 @@ curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/relea | |||
| 6 | 6 | curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VER}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose && \ | |
| 7 | 7 | chmod +x /usr/local/bin/docker-compose && \ | |
| 8 | 8 | # Install ctop | |
| 9 | - | echo "deb http://packages.azlux.fr/debian/ buster main" | sudo tee /etc/apt/sources.list.d/azlux.list && \ | |
| 9 | + | echo "deb http://packages.azlux.fr/debian/ buster main" | tee /etc/apt/sources.list.d/azlux.list && \ | |
| 10 | 10 | wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add - && \ | |
| 11 | 11 | apt update && \ | |
| 12 | 12 | apt install docker-ctop && \ | |
Jan Wagner revisó este gist 4 years ago. Ir a la revisión
1 file changed, 2 insertions, 2 deletions
deploy_addons.sh
| @@ -6,11 +6,11 @@ curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/relea | |||
| 6 | 6 | curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VER}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose && \ | |
| 7 | 7 | chmod +x /usr/local/bin/docker-compose && \ | |
| 8 | 8 | # Install ctop | |
| 9 | - | [ -f /usr/local/bin/ctop ] && rm -rf /usr/local/bin/ctop && \ | |
| 10 | 9 | echo "deb http://packages.azlux.fr/debian/ buster main" | sudo tee /etc/apt/sources.list.d/azlux.list && \ | |
| 11 | 10 | wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add - && \ | |
| 12 | 11 | apt update && \ | |
| 13 | 12 | apt install docker-ctop && \ | |
| 14 | 13 | # Install lazydocker | |
| 15 | 14 | curl -o /tmp/deploy_lazydocker.sh https://gist.githubusercontent.com/waja/be393038c754cff65d58850c1131d938/raw/deploy_lazydocker.sh && \ | |
| 16 | - | bash /tmp/deploy_lazydocker.sh | |
| 15 | + | bash /tmp/deploy_lazydocker.sh && \ | |
| 16 | + | [ -f /usr/local/bin/ctop ] && rm -rf /usr/local/bin/ctop || exit 0 \ | |
Jan Wagner revisó este gist 4 years ago. Ir a la revisión
1 file changed, 5 insertions, 3 deletions
deploy_addons.sh
| @@ -6,9 +6,11 @@ curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/relea | |||
| 6 | 6 | curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VER}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose && \ | |
| 7 | 7 | chmod +x /usr/local/bin/docker-compose && \ | |
| 8 | 8 | # Install ctop | |
| 9 | - | CTOP_VER=$(curl -s -o /dev/null -I -w "%{redirect_url}\n" https://github.com/bcicen/ctop/releases/latest | grep -oP "[0-9]+(\.[0-9]+)+$") && \ | |
| 10 | - | curl -o /usr/local/bin/ctop -L https://github.com/bcicen/ctop/releases/download/v$CTOP_VER/ctop-$CTOP_VER-$(uname -s|tr '[:upper:]' '[:lower:]')-$(dpkg --print-architecture) && \ | |
| 11 | - | chmod +x /usr/local/bin/ctop && \ | |
| 9 | + | [ -f /usr/local/bin/ctop ] && rm -rf /usr/local/bin/ctop && \ | |
| 10 | + | echo "deb http://packages.azlux.fr/debian/ buster main" | sudo tee /etc/apt/sources.list.d/azlux.list && \ | |
| 11 | + | wget -qO - https://azlux.fr/repo.gpg.key | sudo apt-key add - && \ | |
| 12 | + | apt update && \ | |
| 13 | + | apt install docker-ctop && \ | |
| 12 | 14 | # Install lazydocker | |
| 13 | 15 | curl -o /tmp/deploy_lazydocker.sh https://gist.githubusercontent.com/waja/be393038c754cff65d58850c1131d938/raw/deploy_lazydocker.sh && \ | |
| 14 | 16 | bash /tmp/deploy_lazydocker.sh | |
Jan Wagner revisó este gist 6 years ago. Ir a la revisión
2 files changed, 17 insertions, 10 deletions
deploy_addons.sh(archivo creado)
| @@ -0,0 +1,14 @@ | |||
| 1 | + | #!/bin/bash | |
| 2 | + | # Install docker-compose and bash completion | |
| 3 | + | COMPOSE_VER=$(curl -s -o /dev/null -I -w "%{redirect_url}\n" https://github.com/docker/compose/releases/latest | grep -oP "[0-9]+(\.[0-9]+)+$") && \ | |
| 4 | + | curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/releases/download/$COMPOSE_VER/docker-compose-$(uname -s)-$(uname -m) && \ | |
| 5 | + | [ -d /etc/bash_completion.d/ ] || mkdir -p /etc/bash_completion.d/ && \ | |
| 6 | + | curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VER}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose && \ | |
| 7 | + | chmod +x /usr/local/bin/docker-compose && \ | |
| 8 | + | # Install ctop | |
| 9 | + | CTOP_VER=$(curl -s -o /dev/null -I -w "%{redirect_url}\n" https://github.com/bcicen/ctop/releases/latest | grep -oP "[0-9]+(\.[0-9]+)+$") && \ | |
| 10 | + | curl -o /usr/local/bin/ctop -L https://github.com/bcicen/ctop/releases/download/v$CTOP_VER/ctop-$CTOP_VER-$(uname -s|tr '[:upper:]' '[:lower:]')-$(dpkg --print-architecture) && \ | |
| 11 | + | chmod +x /usr/local/bin/ctop && \ | |
| 12 | + | # Install lazydocker | |
| 13 | + | curl -o /tmp/deploy_lazydocker.sh https://gist.githubusercontent.com/waja/be393038c754cff65d58850c1131d938/raw/deploy_lazydocker.sh && \ | |
| 14 | + | bash /tmp/deploy_lazydocker.sh | |
docker_deploy.sh
| @@ -24,16 +24,9 @@ cat > /etc/docker/daemon.json <<EOF | |||
| 24 | 24 | "live-restore": true | |
| 25 | 25 | } | |
| 26 | 26 | EOF | |
| 27 | - | # Install docker-compose and bash completion | |
| 28 | - | COMPOSE_VER=$(curl -s -o /dev/null -I -w "%{redirect_url}\n" https://github.com/docker/compose/releases/latest | grep -oP "[0-9]+(\.[0-9]+)+$") && \ | |
| 29 | - | curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/releases/download/$COMPOSE_VER/docker-compose-$(uname -s)-$(uname -m) && \ | |
| 30 | - | [ -d /etc/bash_completion.d/ ] || mkdir -p /etc/bash_completion.d/ && \ | |
| 31 | - | curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VER}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose && \ | |
| 32 | - | chmod +x /usr/local/bin/docker-compose && \ | |
| 33 | - | # Install ctop | |
| 34 | - | CTOP_VER=$(curl -s -o /dev/null -I -w "%{redirect_url}\n" https://github.com/bcicen/ctop/releases/latest | grep -oP "[0-9]+(\.[0-9]+)+$") && \ | |
| 35 | - | curl -o /usr/local/bin/ctop -L https://github.com/bcicen/ctop/releases/download/v$CTOP_VER/ctop-$CTOP_VER-$(uname -s|tr '[:upper:]' '[:lower:]')-$(dpkg --print-architecture) && \ | |
| 36 | - | chmod +x /usr/local/bin/ctop && \ | |
| 27 | + | # Install docker-compose and ctop | |
| 28 | + | curl -o /tmp/deploy_addons.sh https://gist.githubusercontent.com/waja/01ba2641f93f461044f9/raw/deploy_addons.sh && \ | |
| 29 | + | bash /tmp/deploy_addons.sh && \ | |
| 37 | 30 | # Add some cleanup jobs | |
| 38 | 31 | cat > /etc/cron.weekly/docker-cleanup <<EOF | |
| 39 | 32 | #!/bin/bash | |
Jan Wagner revisó este gist 6 years ago. Ir a la revisión
1 file changed, 4 insertions
docker_deploy.sh
| @@ -30,6 +30,10 @@ curl -o /usr/local/bin/docker-compose -L https://github.com/docker/compose/relea | |||
| 30 | 30 | [ -d /etc/bash_completion.d/ ] || mkdir -p /etc/bash_completion.d/ && \ | |
| 31 | 31 | curl -L https://raw.githubusercontent.com/docker/compose/${COMPOSE_VER}/contrib/completion/bash/docker-compose > /etc/bash_completion.d/docker-compose && \ | |
| 32 | 32 | chmod +x /usr/local/bin/docker-compose && \ | |
| 33 | + | # Install ctop | |
| 34 | + | CTOP_VER=$(curl -s -o /dev/null -I -w "%{redirect_url}\n" https://github.com/bcicen/ctop/releases/latest | grep -oP "[0-9]+(\.[0-9]+)+$") && \ | |
| 35 | + | curl -o /usr/local/bin/ctop -L https://github.com/bcicen/ctop/releases/download/v$CTOP_VER/ctop-$CTOP_VER-$(uname -s|tr '[:upper:]' '[:lower:]')-$(dpkg --print-architecture) && \ | |
| 36 | + | chmod +x /usr/local/bin/ctop && \ | |
| 33 | 37 | # Add some cleanup jobs | |
| 34 | 38 | cat > /etc/cron.weekly/docker-cleanup <<EOF | |
| 35 | 39 | #!/bin/bash | |