Skip to content

Commit

Permalink
Fix apt conflict builds
Browse files Browse the repository at this point in the history
  • Loading branch information
sonroyaalmerol authored Feb 27, 2024
1 parent 982b982 commit 0ee5e0a
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 28 deletions.
34 changes: 20 additions & 14 deletions bookworm/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
FROM arm64v8/debian:bookworm-slim as qemu_build

ENV DEBIAN_FRONTEND noninteractive

# Set SHELL option explicitly
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# hadolint ignore=DL3008
RUN set -x \
# Install, update & upgrade packages
&& dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
libc6:i386=2.36-9+deb12u4 \
qemu-user-static=1:7.2+dfsg-7+deb12u5 \
&& rm -rf /var/lib/apt/lists/*

############################################################
# Dockerfile that contains SteamCMD and Box86/64
############################################################
Expand All @@ -18,6 +35,8 @@ ENV DEBUGGER "/usr/local/bin/box86"
# Set SHELL option explicitly
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

COPY --from=qemu_build /usr/bin/qemu-i386-static /usr/bin/qemu-i386-static

# hadolint ignore=DL3008
RUN set -x \
# Install, update & upgrade packages
Expand All @@ -34,27 +53,14 @@ RUN set -x \
locales=2.36-9+deb12u4 \
wget=1.21.3-1+b1 \
gnupg=2.2.40-1.1 \
qemu-user-static=1:7.2+dfsg-7+deb12u5 \
&& apt-mark hold qemu-user-static \
&& for file in /usr/bin/qemu-*-static /usr/lib/binfmt.d/qemu-* /usr/libexec/qemu-binfmt/* /usr/sbin/qemu-* /usr/share/binfmts/qemu-* /usr/share/doc/qemu-user-static/* /usr/share/lintian/overrides/qemu-user-static /usr/share/man/man1/qemu-*; do \
case "$file" in \
"/usr/bin/qemu-i386-static" | \
"/usr/share/man/man1/qemu-i386-static.1.gz") \
continue;; \
*) \
rm -f "$file";; \
esac; \
done \
&& wget --progress=dot:giga https://ryanfortner.github.io/box64-debs/box64.list -O /etc/apt/sources.list.d/box64.list \
&& (wget -qO- https://ryanfortner.github.io/box64-debs/KEY.gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg) \
&& wget --progress=dot:giga https://itai-nelken.github.io/weekly-box86-debs/debian/box86.list -O /etc/apt/sources.list.d/box86.list \
&& (wget -qO- https://itai-nelken.github.io/weekly-box86-debs/debian/KEY.gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/box86-debs-archive-keyring.gpg) \
&& apt-get update \
&& apt-get download -y \
&& apt-get install -y --no-install-recommends --no-install-suggests \
box64-arm64 \
box86 \
&& dpkg --force-all -i ./*.deb \
&& rm -rf ./*.deb \
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
# Create unprivileged user
Expand Down
34 changes: 20 additions & 14 deletions bullseye/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,3 +1,20 @@
FROM arm64v8/debian:bookworm-slim as qemu_build

ENV DEBIAN_FRONTEND noninteractive

# Set SHELL option explicitly
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

# hadolint ignore=DL3008
RUN set -x \
# Install, update & upgrade packages
&& dpkg --add-architecture i386 \
&& apt-get update \
&& apt-get install -y --no-install-recommends --no-install-suggests \
libc6:i386=2.36-9+deb12u4 \
qemu-user-static=1:5.2+dfsg-11+deb11u3 \
&& rm -rf /var/lib/apt/lists/*

############################################################
# Dockerfile that contains SteamCMD and Box86/64
############################################################
Expand All @@ -18,6 +35,8 @@ ENV DEBUGGER "/usr/local/bin/box86"
# Set SHELL option explicitly
SHELL ["/bin/bash", "-o", "pipefail", "-c"]

COPY --from=qemu_build /usr/bin/qemu-i386-static /usr/bin/qemu-i386-static

# hadolint ignore=DL3008
RUN set -x \
# Install, update & upgrade packages
Expand All @@ -34,27 +53,14 @@ RUN set -x \
locales=2.31-13+deb11u7 \
wget=1.21-1+deb11u1 \
gnupg=2.2.27-2+deb11u2 \
qemu-user-static=1:5.2+dfsg-11+deb11u3 \
&& apt-mark hold qemu-user-static \
&& for file in /usr/bin/qemu-*-static /usr/lib/binfmt.d/qemu-* /usr/libexec/qemu-binfmt/* /usr/sbin/qemu-* /usr/share/binfmts/qemu-* /usr/share/doc/qemu-user-static/* /usr/share/lintian/overrides/qemu-user-static /usr/share/man/man1/qemu-*; do \
case "$file" in \
"/usr/bin/qemu-i386-static" | \
"/usr/share/man/man1/qemu-i386-static.1.gz") \
continue;; \
*) \
rm -f "$file";; \
esac; \
done \
&& wget --progress=dot:giga https://ryanfortner.github.io/box64-debs/box64.list -O /etc/apt/sources.list.d/box64.list \
&& (wget -qO- https://ryanfortner.github.io/box64-debs/KEY.gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/box64-debs-archive-keyring.gpg) \
&& wget --progress=dot:giga https://itai-nelken.github.io/weekly-box86-debs/debian/box86.list -O /etc/apt/sources.list.d/box86.list \
&& (wget -qO- https://itai-nelken.github.io/weekly-box86-debs/debian/KEY.gpg | gpg --dearmor -o /etc/apt/trusted.gpg.d/box86-debs-archive-keyring.gpg) \
&& apt-get update \
&& apt-get download -y \
&& apt-get install -y --no-install-recommends --no-install-suggests \
box64-arm64 \
box86 \
&& dpkg --force-all -i ./*.deb \
&& rm -rf ./*.deb \
&& sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen \
&& dpkg-reconfigure --frontend=noninteractive locales \
# Create unprivileged user
Expand Down

0 comments on commit 0ee5e0a

Please sign in to comment.