Update docker-install.sh
This commit is contained in:
parent
6419c175a8
commit
0379c6dbe3
@ -13,10 +13,6 @@ setting_up_container
|
|||||||
network_check
|
network_check
|
||||||
update_os
|
update_os
|
||||||
|
|
||||||
# Apply AppArmor workaround BEFORE installing Docker
|
|
||||||
# See: https://github.com/opencontainers/runc/issues/4968
|
|
||||||
apply_docker_apparmor_workaround
|
|
||||||
|
|
||||||
get_latest_release() {
|
get_latest_release() {
|
||||||
curl -fsSL https://api.github.com/repos/"$1"/releases/latest | grep '"tag_name":' | cut -d'"' -f4
|
curl -fsSL https://api.github.com/repos/"$1"/releases/latest | grep '"tag_name":' | cut -d'"' -f4
|
||||||
}
|
}
|
||||||
@ -31,15 +27,14 @@ DOCKER_CONFIG_PATH='/etc/docker/daemon.json'
|
|||||||
mkdir -p $(dirname $DOCKER_CONFIG_PATH)
|
mkdir -p $(dirname $DOCKER_CONFIG_PATH)
|
||||||
echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json
|
echo -e '{\n "log-driver": "journald"\n}' >/etc/docker/daemon.json
|
||||||
$STD sh <(curl -fsSL https://get.docker.com)
|
$STD sh <(curl -fsSL https://get.docker.com)
|
||||||
|
|
||||||
# Restart Docker to apply AppArmor workaround (if running in LXC)
|
|
||||||
if grep -q "lxc" /proc/1/cgroup 2>/dev/null || systemd-detect-virt -c 2>/dev/null | grep -q lxc; then
|
|
||||||
$STD systemctl restart docker.service
|
|
||||||
sleep 2
|
|
||||||
fi
|
|
||||||
|
|
||||||
msg_ok "Installed Docker $DOCKER_LATEST_VERSION"
|
msg_ok "Installed Docker $DOCKER_LATEST_VERSION"
|
||||||
|
|
||||||
|
# Apply AppArmor workaround BEFORE installing Docker
|
||||||
|
# See: https://github.com/opencontainers/runc/issues/4968
|
||||||
|
apply_docker_apparmor_workaround
|
||||||
|
# Restart Docker to apply AppArmor workaround (if running in LXC)
|
||||||
|
$STD systemctl restart docker
|
||||||
|
|
||||||
read -r -p "${TAB3}Install Docker Compose v2 plugin? <y/N> " prompt_compose
|
read -r -p "${TAB3}Install Docker Compose v2 plugin? <y/N> " prompt_compose
|
||||||
if [[ ${prompt_compose,,} =~ ^(y|yes)$ ]]; then
|
if [[ ${prompt_compose,,} =~ ^(y|yes)$ ]]; then
|
||||||
msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
|
msg_info "Installing Docker Compose $DOCKER_COMPOSE_LATEST_VERSION"
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user