Skip to content

Commit 8f0ee60

Browse files
streamline Docker CLI and Buildx installation process
1 parent 42e22c9 commit 8f0ee60

1 file changed

Lines changed: 3 additions & 12 deletions

File tree

src/docker-outside-of-docker/install.sh

Lines changed: 3 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -327,20 +327,11 @@ else
327327
if [ "${INSTALL_DOCKER_BUILDX}" = "true" ]; then
328328
buildx=(docker-buildx-plugin)
329329
fi
330+
#install cli + buildx first
331+
apt-get -y install --no-install-recommends ${cli_package_name}${cli_version_suffix} "${buildx[@]}"
330332
if [ "${DOCKER_DASH_COMPOSE_VERSION}" != "v1" ]; then
331-
apt-get -y install --no-install-recommends ${cli_package_name}${cli_version_suffix} "${buildx[@]}" docker-compose-plugin
332-
else
333-
apt-get -y install --no-install-recommends ${cli_package_name}${cli_version_suffix} "${buildx[@]}"
334-
fi
335-
buildx_path="/usr/libexec/docker/cli-plugins/docker-buildx"
336-
# Older versions of Docker CE installs buildx as part of the CLI package
337-
if [ "${INSTALL_DOCKER_BUILDX}" = "false" ] && [ -f "${buildx_path}" ]; then
338-
echo "(*) Removing docker-buildx installed from docker-ce-cli since installDockerBuildx is disabled..."
339-
rm -f "${buildx_path}"
333+
apt-get -y install --no-install-recommends docker-compose-plugin
340334
fi
341-
fi
342-
unset buildx buildx_path
343-
fi
344335

345336
# If 'docker-compose' command is to be included
346337
if [ "${DOCKER_DASH_COMPOSE_VERSION}" != "none" ]; then

0 commit comments

Comments
 (0)