Skip to content

Commit

Permalink
Merge pull request #743 from linuxserver/universal-docker-in-docker-a…
Browse files Browse the repository at this point in the history
…rmhf

universal-docker-in-docker: deprecate armhf
  • Loading branch information
aptalca authored Aug 9, 2023
2 parents 2b033ca + 3d7921a commit 5b556c3
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 24 deletions.
23 changes: 0 additions & 23 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,6 @@ FROM ghcr.io/linuxserver/baseimage-alpine:3.17 as buildstage
ARG MOD_VERSION

RUN \
echo "**** install packages ****" && \
apk add --no-cache \
git \
go && \
echo "**** retrieve latest version ****" && \
if [[ -z "${MOD_VERSION+x}" ]]; then \
DOCKER_RELEASE=$(curl -sX GET "https://api.github.com/repos/moby/moby/releases/latest" \
Expand All @@ -27,19 +23,13 @@ RUN \
curl -fo \
/root-layer/docker-tgz/docker_x86_64.tgz -L \
"https://download.docker.com/linux/static/stable/x86_64/docker-${DOCKER_RELEASE}.tgz" && \
curl -fo \
/root-layer/docker-tgz/docker_armv7l.tgz -L \
"https://download.docker.com/linux/static/stable/armhf/docker-${DOCKER_RELEASE}.tgz" && \
curl -fo \
/root-layer/docker-tgz/docker_aarch64.tgz -L \
"https://download.docker.com/linux/static/stable/aarch64/docker-${DOCKER_RELEASE}.tgz" && \
echo "**** grab compose ****" && \
curl -fo \
/root-layer/docker-tgz/docker-compose_x86_64 -L \
"https://github.com/docker/compose/releases/download/v${COMPOSE_RELEASE}/docker-compose-linux-x86_64" && \
curl -fo \
/root-layer/docker-tgz/docker-compose_armv7l -L \
"https://github.com/docker/compose/releases/download/v${COMPOSE_RELEASE}/docker-compose-linux-armv7" && \
curl -fo \
/root-layer/docker-tgz/docker-compose_aarch64 -L \
"https://github.com/docker/compose/releases/download/v${COMPOSE_RELEASE}/docker-compose-linux-aarch64" && \
Expand All @@ -54,26 +44,13 @@ RUN \
curl -fo \
/root-layer/docker-tgz/compose-switch_aarch64 -L \
"https://github.com/docker/compose-switch/releases/download/v${SWITCH_RELEASE}/docker-compose-linux-arm64" && \
echo "**** compile compose switch on armhf ****" && \
curl -fo \
/tmp/compose-switch.tar.gz -L \
"https://github.com/docker/compose-switch/archive/refs/tags/v${SWITCH_RELEASE}.tar.gz" && \
mkdir -p /tmp/compose-switch && \
tar xf \
/tmp/compose-switch.tar.gz -C \
/tmp/compose-switch --strip-components=1 && \
cd /tmp/compose-switch && \
CGO_ENABLED=0 GOOS=linux GOARCH=arm go build -ldflags="-s -w -X github.com/docker/compose-switch/internal.Version=${SWITCH_RELEASE}" -o /root-layer/docker-tgz/compose-switch_armv7l ./main.go && \
echo "**** retrieve latest buildx version ****" && \
BUILDX_RELEASE=$(curl -sX GET "https://api.github.com/repos/docker/buildx/releases/latest" \
| awk '/tag_name/{print $4;exit}' FS='[""]') && \
echo "**** grab buildx ****" && \
curl -fo \
/root-layer/docker-tgz/docker-buildx_x86_64 -L \
"https://github.com/docker/buildx/releases/download/${BUILDX_RELEASE}/buildx-${BUILDX_RELEASE}.linux-amd64" && \
curl -fo \
/root-layer/docker-tgz/docker-buildx_armv7l -L \
"https://github.com/docker/buildx/releases/download/${BUILDX_RELEASE}/buildx-${BUILDX_RELEASE}.linux-arm-v7" && \
curl -fo \
/root-layer/docker-tgz/docker-buildx_aarch64 -L \
"https://github.com/docker/buildx/releases/download/${BUILDX_RELEASE}/buildx-${BUILDX_RELEASE}.linux-arm64" && \
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
#!/usr/bin/with-contenv bash

ARCH=$(uname -m)
if [[ "${ARCH}" = "armv7l" ]]; then
echo "**** The universal docker mod no longer supports arm32v7/armhf per https://info.linuxserver.io/issues/2023-07-01-armhf/ ****"
exit 0
fi

ABC_USER=$(id -nu ${PUID:-911})
mkdir -p /config/{logs/dockerd,var/lib/docker}
lsiown -R ${ABC_USER}:${ABC_USER} /config/logs
Expand Down Expand Up @@ -32,7 +38,6 @@ else
xfsprogs \
xz" >> /mod-repo-packages-to-install.list
fi
ARCH=$(uname -m)
if [ -d "/docker-tgz" ] ; then
echo "Copying over docker and docker-compose binaries"
mkdir -p /usr/local/lib/docker/cli-plugins
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/with-contenv bash

if [[ $(uname -m) = "armv7l" ]]; then
echo "**** The universal docker mod no longer supports arm32v7/armhf per https://info.linuxserver.io/issues/2023-07-01-armhf/ ****"
exit 0
fi

if [[ $(uname -m) = "x86_64" ]]; then
echo "**** Enabling QEMU ****"
exec docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,10 @@
#!/usr/bin/with-contenv bash

if [[ $(uname -m) = "armv7l" ]]; then
echo "**** The universal docker mod no longer supports arm32v7/armhf per https://info.linuxserver.io/issues/2023-07-01-armhf/ ****"
sleep infinity
fi

## dind hack from https://github.com/moby/moby/blob/master/hack/dind
export container=docker
if [ -d /sys/kernel/security ] && ! mountpoint -q /sys/kernel/security; then
Expand Down

0 comments on commit 5b556c3

Please sign in to comment.