Versions before 18.09 do not install docker-ce-cli

This commit is contained in:
taocy 2020-05-21 12:09:06 +00:00
parent dc0f010066
commit 3be2fc56ba
3 changed files with 8 additions and 3 deletions

View File

@ -204,7 +204,12 @@ sudo LANG=C chroot $FILESYSTEM_ROOT rm /tmp/docker.gpg
sudo LANG=C chroot $FILESYSTEM_ROOT add-apt-repository \
"deb [arch=$CONFIGURED_ARCH] https://download.docker.com/linux/debian $IMAGE_DISTRO stable"
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get update
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install docker-ce=${DOCKER_VERSION} docker-ce-cli=${DOCKER_VERSION}
if dpkg --compare-versions ${DOCKER_VERSION} ge "18.09"; then
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install docker-ce=${DOCKER_VERSION} docker-ce-cli=${DOCKER_VERSION}
else
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y install docker-ce=${DOCKER_VERSION}
fi
sudo LANG=C chroot $FILESYSTEM_ROOT apt-get -y remove software-properties-common gnupg2
if [ "$INSTALL_KUBERNETES" == "y" ]

View File

@ -419,7 +419,7 @@ RUN apt-get update
{%- if CONFIGURED_ARCH == "amd64" %}
RUN apt-get install -y docker-ce=5:18.09.5~3-0~debian-buster docker-ce-cli=5:18.09.5~3-0~debian-buster
{%- else %}
RUN apt-get install -y docker-ce=18.06.3~ce~3-0~debian docker-ce-cli=18.06.3~ce~3-0~debian
RUN apt-get install -y docker-ce=18.06.3~ce~3-0~debian
{%- endif %}
RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/docker
RUN update-alternatives --set iptables /usr/sbin/iptables-legacy

View File

@ -429,6 +429,6 @@ RUN apt-get update
{%- if CONFIGURED_ARCH == "amd64" %}
RUN apt-get install -y docker-ce=5:18.09.5~3-0~debian-stretch docker-ce-cli=5:18.09.5~3-0~debian-stretch
{%- else %}
RUN apt-get install -y docker-ce=18.06.3~ce~3-0~debian docker-ce-cli=18.06.3~ce~3-0~debian
RUN apt-get install -y docker-ce=18.06.3~ce~3-0~debian
{%- endif %}
RUN echo "DOCKER_OPTS=\"--experimental --storage-driver=vfs\"" >> /etc/default/docker