mirror of
https://ops.gitlab.net/gitlab-org/gitlab-build-images.git
synced 2025-12-10 02:22:57 +01:00
Install docker and buildx using official instructions
This commit is contained in:
parent
65485241a6
commit
41165c16ff
4 changed files with 16 additions and 22 deletions
|
|
@ -3,10 +3,10 @@
|
|||
set -xeou pipefail
|
||||
|
||||
BUILDX_VERSION=${1}
|
||||
BUILDX_DOWNLOAD_SHA256=${2}
|
||||
BUILDX_DOWNLOAD_URL="https://github.com/docker/buildx/releases/download/v${BUILDX_VERSION}/buildx-v${BUILDX_VERSION}.linux-${TARGETARCH:-amd64}"
|
||||
|
||||
/scripts/download-file docker-buildx "$BUILDX_DOWNLOAD_URL" $BUILDX_DOWNLOAD_SHA256
|
||||
PACKAGE_VERSION=$(apt-cache policy docker-buildx-plugin | awk -v dv=${BUILDX_VERSION} '$1 ~ dv {print $1}')
|
||||
|
||||
mkdir -p /usr/local/lib/docker/cli-plugins
|
||||
chmod +x docker-buildx && mv docker-buildx /usr/local/lib/docker/cli-plugins/
|
||||
apt-get update && apt-get install -y docker-buildx-plugin=${PACKAGE_VERSION}
|
||||
|
||||
apt-get -yq autoremove
|
||||
apt-get clean -yqq
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue