Skip to content

Commit

Permalink
Use heredoc in Containerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
aguslr committed May 23, 2024
1 parent e982ae8 commit 72ac57e
Show file tree
Hide file tree
Showing 2 changed files with 121 additions and 107 deletions.
161 changes: 84 additions & 77 deletions Dockerfile.full
Original file line number Diff line number Diff line change
Expand Up @@ -4,84 +4,91 @@ FROM docker.io/${BASE_IMAGE}

ENV QEMU_VER=8.2.0

RUN \
apt-get update && \
env DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
wget imagemagick file build-essential python3-pip && \
apt-get install -y --no-install-recommends \
git bison flex ninja-build python3-venv valgrind \
libaio-dev \
libbluetooth-dev \
libbpf-dev \
libbrlapi-dev \
libbz2-dev \
libcacard-dev \
libcap-ng-dev \
libcapstone-dev \
libcurl4-gnutls-dev \
libdaxctl-dev \
libdrm-dev \
libdw-dev \
libepoxy-dev \
libfdt-dev \
libfuse3-dev \
libgbm-dev \
libgcrypt20-dev \
libglib2.0-dev \
libglusterfs-dev \
libgtk-3-dev \
libibverbs-dev \
libiscsi-dev \
libjack-dev \
libjpeg-dev \
libkeyutils-dev \
liblzo2-dev \
libmount-dev \
libncurses5-dev \
libnfs-dev \
libnuma-dev \
libp11-kit-dev \
libpam0g-dev \
libpixman-1-dev \
libpmem-dev \
libpulse-dev \
librbd-dev \
librdmacm-dev \
libsasl2-dev \
libsdl2-dev libsdl2-image-dev \
libseccomp-dev \
libslirp-dev \
libsnappy-dev \
libsndio-dev \
libspice-server-dev \
libssh-dev \
libu2f-udev \
libunistring-dev \
libusb-1.0-0-dev libusb-dev libusbredirhost-dev \
libvde-dev \
libvdeplug-dev \
libvirglrenderer-dev \
libvncserver-dev \
libvte-2.91-dev libvte-dev \
libxen-dev \
libxkbcommon-dev \
libzstd-dev \
xfslibs-dev \
zlib1g-dev \
-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /var/lib/apt/lists/*
RUN <<-EOT bash
set -eu

RUN \
wget -c -nv -P / \
"https://download.qemu.org/qemu-${QEMU_VER}.tar.xz" && \
wget -c -nv \
"https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-$(uname -m).AppImage" \
-O /usr/local/bin/linuxdeployqt.appimage && \
chmod a+x /usr/local/bin/linuxdeployqt.appimage && \
mkdir -p /opt/linuxdeploy && cd /opt/linuxdeploy && \
/usr/local/bin/linuxdeployqt.appimage --appimage-extract && \
rm -f /usr/local/bin/linuxdeployqt.appimage
env DEBIAN_FRONTEND=noninteractive
apt-get update

apt-get install -y \
wget imagemagick file build-essential python3-pip

apt-get install -y --no-install-recommends \
git bison flex ninja-build python3-venv valgrind \
libaio-dev \
libbluetooth-dev \
libbpf-dev \
libbrlapi-dev \
libbz2-dev \
libcacard-dev \
libcap-ng-dev \
libcapstone-dev \
libcurl4-gnutls-dev \
libdaxctl-dev \
libdrm-dev \
libdw-dev \
libepoxy-dev \
libfdt-dev \
libfuse3-dev \
libgbm-dev \
libgcrypt20-dev \
libglib2.0-dev \
libglusterfs-dev \
libgtk-3-dev \
libibverbs-dev \
libiscsi-dev \
libjack-dev \
libjpeg-dev \
libkeyutils-dev \
liblzo2-dev \
libmount-dev \
libncurses5-dev \
libnfs-dev \
libnuma-dev \
libp11-kit-dev \
libpam0g-dev \
libpixman-1-dev \
libpmem-dev \
libpulse-dev \
librbd-dev \
librdmacm-dev \
libsasl2-dev \
libsdl2-dev libsdl2-image-dev \
libseccomp-dev \
libslirp-dev \
libsnappy-dev \
libsndio-dev \
libspice-server-dev \
libssh-dev \
libu2f-udev \
libunistring-dev \
libusb-1.0-0-dev libusb-dev libusbredirhost-dev \
libvde-dev \
libvdeplug-dev \
libvirglrenderer-dev \
libvncserver-dev \
libvte-2.91-dev libvte-dev \
libxen-dev \
libxkbcommon-dev \
libzstd-dev \
xfslibs-dev \
zlib1g-dev \
-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"

apt-get clean && rm -rf /var/lib/apt/lists/* /var/lib/apt/lists/*

wget -c -nv -P / \
"https://download.qemu.org/qemu-${QEMU_VER}.tar.xz"

wget -c -nv \
"https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-$(uname -m).AppImage" \
-O /usr/local/bin/linuxdeployqt.appimage && \
chmod a+x /usr/local/bin/linuxdeployqt.appimage

mkdir -p /opt/linuxdeploy && cd /opt/linuxdeploy && \
/usr/local/bin/linuxdeployqt.appimage --appimage-extract && \
rm -f /usr/local/bin/linuxdeployqt.appimage
EOT

WORKDIR /src

Expand Down
67 changes: 37 additions & 30 deletions Dockerfile.slim
Original file line number Diff line number Diff line change
Expand Up @@ -4,36 +4,43 @@ FROM docker.io/${BASE_IMAGE}

ENV QEMU_VER=8.2.0

RUN \
apt-get update && \
env DEBIAN_FRONTEND=noninteractive \
apt-get install -y \
wget imagemagick file build-essential python3-pip && \
apt-get install -y --no-install-recommends \
bison flex ninja-build valgrind \
libcap-ng-dev \
libepoxy-dev \
libpixman-1-dev \
libpmem-dev \
libpulse-dev \
libsdl2-dev libsdl2-image-dev \
libslirp-dev \
libspice-server-dev \
libusb-1.0-0-dev libusb-dev libusbredirhost-dev \
libvncserver-dev \
-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold" \
&& apt-get clean && rm -rf /var/lib/apt/lists/* /var/lib/apt/lists/*

RUN \
wget -c -nv -P / \
"https://download.qemu.org/qemu-${QEMU_VER}.tar.xz" && \
wget -c -nv \
"https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-$(uname -m).AppImage" \
-O /usr/local/bin/linuxdeployqt.appimage && \
chmod a+x /usr/local/bin/linuxdeployqt.appimage && \
mkdir -p /opt/linuxdeploy && cd /opt/linuxdeploy && \
/usr/local/bin/linuxdeployqt.appimage --appimage-extract && \
rm -f /usr/local/bin/linuxdeployqt.appimage
RUN <<-EOT bash
set -eu

env DEBIAN_FRONTEND=noninteractive
apt-get update

apt-get install -y \
wget imagemagick file build-essential python3-pip

apt-get install -y --no-install-recommends \
bison flex ninja-build valgrind \
libcap-ng-dev \
libepoxy-dev \
libpixman-1-dev \
libpmem-dev \
libpulse-dev \
libsdl2-dev libsdl2-image-dev \
libslirp-dev \
libspice-server-dev \
libusb-1.0-0-dev libusb-dev libusbredirhost-dev \
libvncserver-dev \
-o Dpkg::Options::="--force-confdef" -o Dpkg::Options::="--force-confold"

apt-get clean && rm -rf /var/lib/apt/lists/* /var/lib/apt/lists/*

wget -c -nv -P / \
"https://download.qemu.org/qemu-${QEMU_VER}.tar.xz"

wget -c -nv \
"https://github.com/probonopd/linuxdeployqt/releases/download/continuous/linuxdeployqt-continuous-$(uname -m).AppImage" \
-O /usr/local/bin/linuxdeployqt.appimage && \
chmod a+x /usr/local/bin/linuxdeployqt.appimage

mkdir -p /opt/linuxdeploy && cd /opt/linuxdeploy && \
/usr/local/bin/linuxdeployqt.appimage --appimage-extract && \
rm -f /usr/local/bin/linuxdeployqt.appimage
EOT

WORKDIR /src

Expand Down

0 comments on commit 72ac57e

Please sign in to comment.