Skip to content

Commit

Permalink
Allow-downgrades for dockerce and containerd
Browse files Browse the repository at this point in the history
If dockerce or/and containerd is/are already present on the machine, then the setup script will not install them if the version installed is already higher than what we require, so I have added a allow-downgrades flag to the installation script

Signed-off-by: Yakul Garg <2000yeshu@gmail.com>
  • Loading branch information
Yakul Garg authored and Yakul Garg committed Oct 14, 2021
1 parent fa0c9e3 commit a941dea
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion pkg/containerruntime/containerd.go
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ Restart=always
EnvironmentFile=-/etc/environment
EOF
apt-get install -y containerd.io={{ .ContainerdVersion }}*
apt-get install -y --allow-downgrades containerd.io={{ .ContainerdVersion }}*
apt-mark hold containerd.io
systemctl daemon-reload
Expand Down
2 changes: 1 addition & 1 deletion pkg/containerruntime/docker.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ Restart=always
EnvironmentFile=-/etc/environment
EOF
apt-get install -y \
apt-get install --allow-downgrades -y \
{{- if .ContainerdVersion }}
containerd.io={{ .ContainerdVersion }}* \
docker-ce-cli=5:{{ .DockerVersion }}* \
Expand Down

0 comments on commit a941dea

Please sign in to comment.