Skip to content
This repository has been archived by the owner on Aug 22, 2022. It is now read-only.

Commit

Permalink
Remove the plugin download and enable the experimental flag
Browse files Browse the repository at this point in the history
Signed-off-by: Alex Thomae <git@alex.thom.ae>
  • Loading branch information
tlex committed Sep 26, 2020
1 parent e498a8f commit 5b51326
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 20 deletions.
28 changes: 12 additions & 16 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ variables:
DOCKER_TLS: 'true'
DOCKER_HOST: tcp://docker:2376/
BUILDKIT_INLINE_CACHE: '1'
DOCKER_CLI_EXPERIMENTAL: 'enabled'
# Dockerhub variables
DOCKERHUB_REPO_NAME: docker-buildx-qemu
# Debian variables
Expand All @@ -31,26 +32,21 @@ services:
- |
apt-get install -y --no-install-recommends \
apt-transport-https \
ca-certificates \
curl \
gnupg2 \
software-properties-common
software-properties-common \
\
ca-certificates \
\
binfmt-support \
qemu-user-static \
\
git \
jq \
curl
- curl -fsSL https://download.docker.com/linux/debian/gpg | apt-key add -
- add-apt-repository "deb https://download.docker.com/linux/debian $(lsb_release -cs) stable"
- apt-get update
- |
apt-get install -y --no-install-recommends \
docker-ce-cli \
binfmt-support \
qemu-user-static \
git \
jq
- mkdir -p ~/.docker/cli-plugins
- |
curl -s https://api.github.com/repos/docker/buildx/releases/latest \
| grep "browser_download_url.*linux-$(dpkg --print-architecture)" | cut -d : -f 2,3 | tr -d \" \
| xargs curl -sL -o ~/.docker/cli-plugins/docker-buildx
- chmod a+x ~/.docker/cli-plugins/docker-buildx;
- apt-get install -y --no-install-recommends docker-ce-cli
- export BUILDX_NAME="buildx-$(tr -cd '[:alnum:]' < /dev/urandom | fold -w6 | head -n1)"
- docker version && docker buildx version
- docker context create "${BUILDX_NAME}"
Expand Down
7 changes: 3 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
FROM debian:stable-slim as BUILDER

# TODO disable this flag once it's not needed for `buildx` anymore
ENV DOCKER_CLI_EXPERIMENTAL=enabled

FROM debian:stable-slim
LABEL maintainer="docker@ix.ai" \
ai.ix.repository="ix.ai/docker-buildx-qemu"
Expand Down Expand Up @@ -43,5 +40,7 @@ RUN set -eux; \
apt-get -y --purge autoremove; \
rm -rf /var/lib/apt/lists/* /var/log/* /var/tmp/* /tmp/*; \
\
docker --version; \
# TODO disable this flag once it's not needed for `buildx` anymore
mkdir -p ~/.docker; \
echo '{"experimental":"enabled"}' > ~/.docker/config.json; \
docker buildx version

0 comments on commit 5b51326

Please sign in to comment.