remove docker installation from everywhere

This commit is contained in:
Sergey Kanzhelev
2022-02-17 08:02:13 +00:00
parent df2768123d
commit 19a01fa8c6
5 changed files with 5 additions and 321 deletions

View File

@@ -51,7 +51,7 @@ spec:
command:
- "/bin/sh"
- "-c"
- "exec /node-problem-detector --logtostderr --config.system-log-monitor=/config/kernel-monitor.json,/config/docker-monitor.json,/config/systemd-monitor.json --config.custom-plugin-monitor=/config/kernel-monitor-counter.json,/config/systemd-monitor-counter.json --config.system-stats-monitor=/config/system-stats-monitor.json >>/var/log/node-problem-detector.log 2>&1"
- "exec /node-problem-detector --logtostderr --config.system-log-monitor=/config/kernel-monitor.json,/config/systemd-monitor.json --config.custom-plugin-monitor=/config/kernel-monitor-counter.json,/config/systemd-monitor-counter.json --config.system-stats-monitor=/config/system-stats-monitor.json >>/var/log/node-problem-detector.log 2>&1"
securityContext:
privileged: true
resources:

View File

@@ -472,44 +472,6 @@ function load-docker-images {
fi
}
# If we are on ubuntu we can try to install docker
function install-docker {
# bailout if we are not on ubuntu
if ! command -v apt-get >/dev/null 2>&1; then
echo "Unable to automatically install docker. Bailing out..."
return
fi
# Install Docker deps, some of these are already installed in the image but
# that's fine since they won't re-install and we can reuse the code below
# for another image someday.
apt-get update
apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
socat \
curl \
gnupg2 \
software-properties-common \
lsb-release
release=$(lsb_release -cs)
# Add the Docker apt-repository
# shellcheck disable=SC2086
curl ${CURL_FLAGS} \
--location \
"https://download.docker.com/${HOST_PLATFORM}/$(. /etc/os-release; echo "$ID")/gpg" \
| apt-key add -
add-apt-repository \
"deb [arch=${HOST_ARCH}] https://download.docker.com/${HOST_PLATFORM}/$(. /etc/os-release; echo "$ID") \
$release stable"
# Install Docker
apt-get update && \
apt-get install -y --no-install-recommends "${GCI_DOCKER_VERSION:-"docker-ce=5:19.03.*"}"
rm -rf /var/lib/apt/lists/*
}
# If we are on ubuntu we can try to install containerd
function install-containerd-ubuntu {
# bailout if we are not on ubuntu
@@ -591,7 +553,7 @@ function ensure-container-runtime {
if [[ -e "/etc/profile.d/containerd_env.sh" ]]; then
log-wrap 'SourceContainerdEnv' source "/etc/profile.d/containerd_env.sh"
fi
# Verify presence and print versions of ctr, containerd, runc
if ! command -v ctr >/dev/null 2>&1; then
echo "ERROR ctr not found. Aborting."

View File

@@ -982,7 +982,7 @@ function Configure-GcePdTools {
Import-Module -Name $modulePath'.replace('K8S_DIR', ${env:K8S_DIR})
}
# Setup cni network. This function supports both Docker and containerd.
# Setup cni network for containerd.
function Prepare-CniNetworking {
Configure_Containerd_CniNetworking
}
@@ -1213,8 +1213,7 @@ function Pull-InfraContainer {
Log-Output "Infra/pause container:`n$inspect"
}
# Setup the container runtime on the node. It supports both
# Docker and containerd.
# Setup the containerd on the node.
function Setup-ContainerRuntime {
Install-Pigz
Install_Containerd
@@ -1251,35 +1250,6 @@ function Enable-HyperVFeature {
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Hyper-V-Management-PowerShell -All -NoRestart
}
function Test-DockerIsInstalled {
return ((Get-Package `
-ProviderName DockerMsftProvider `
-ErrorAction SilentlyContinue |
Where-Object Name -eq 'docker') -ne $null)
}
function Test-DockerIsRunning {
return ((Get-Service docker).Status -eq 'Running')
}
# Installs Docker EE via the DockerMsftProvider. Ensure that the Windows
# Containers feature is installed before calling this function; otherwise,
# a restart may be needed after this function returns.
function Install-Docker {
Log-Output 'Installing NuGet module'
Install-PackageProvider -Name NuGet -MinimumVersion 2.8.5.201 -Force
Log-Output 'Installing DockerMsftProvider module'
Install-Module -Name DockerMsftProvider -Repository PSGallery -Force
Log-Output "Installing latest Docker EE version"
Install-Package `
-Name docker `
-ProviderName DockerMsftProvider `
-Force `
-Verbose
}
# Configures the TCP/IP parameters to be in sync with the GCP recommendation.
# Not setting these values correctly can cause network issues for connections
# that live longer than 10 minutes.
@@ -1518,7 +1488,7 @@ function Install-Pigz {
Expand-Archive -Path "$PIGZ_ROOT\pigz-$PIGZ_VERSION.zip" `
-DestinationPath $PIGZ_ROOT
Remove-Item -Path "$PIGZ_ROOT\pigz-$PIGZ_VERSION.zip"
# Docker and Containerd search for unpigz.exe on the first container image
# Containerd search for unpigz.exe on the first container image
# pull request after the service is started. If unpigz.exe is in the
# Windows path it'll use it instead of the default unzipper.
# See: https://github.com/containerd/containerd/issues/1896