1
0
Files
electrum/contrib/build-linux/appimage/Dockerfile
f321x b93ffdd79d appimage: bump appimagetool to new version/repo
Updates the appimage build scripts to use the newer
https://github.com/AppImage/appimagetool tool to bundle the appimage
instead of the discontinued https://github.com/AppImage/AppImageKit.
To prevent the new appimagetool from downloading a random "latest"
appimage runtime (`type2-runtime`) binary this PR also adds
functionality to clone and build
https://github.com/AppImage/type2-runtime from source. This is done
using the build scripts provided in the `type2-runtime` repository,
however the Dockerfile they use for building is replaced by a copy with
pinned package versions to prevent issues with reproducibility.

This should fix the issue of missing libfuse2 which users of the appimage
have on "modern" distributions.
The new `type2-runtime` is statically linked and includes the required
dependencies now instead of relying on the host to provide it.
2025-08-12 11:06:11 +02:00

88 lines
2.4 KiB
Docker

# Note: we deliberately use an old Debian stable as base image.
# from https://docs.appimage.org/introduction/concepts.html :
# "[AppImages] should be built on the oldest possible system, allowing them to run on newer system[s]"
FROM debian:bullseye@sha256:cf48c31af360e1c0a0aedd33aae4d928b68c2cdf093f1612650eb1ff434d1c34
ENV LC_ALL=C.UTF-8 LANG=C.UTF-8
ENV DEBIAN_FRONTEND=noninteractive
# need ca-certificates before using snapshot packages
RUN apt update -qq > /dev/null && apt install -qq --yes --no-install-recommends \
ca-certificates
# pin the distro packages
COPY apt.sources.list /etc/apt/sources.list
COPY apt.preferences /etc/apt/preferences.d/snapshot
RUN apt-get update -q && \
apt-get install -qy --allow-downgrades \
sudo \
git \
wget \
make \
autotools-dev \
autoconf \
libtool \
autopoint \
pkg-config \
xz-utils \
libssl-dev \
libssl1.1 \
openssl \
zlib1g-dev \
libffi-dev \
libncurses5-dev \
libncurses5 \
libtinfo-dev \
libtinfo5 \
libsqlite3-dev \
libusb-1.0-0-dev \
libudev-dev \
libudev1 \
gettext \
libdbus-1-3 \
xutils-dev \
libxkbcommon0 \
libxkbcommon-x11-0 \
libxcb1-dev \
libxcb-xinerama0 \
libxcb-randr0 \
libxcb-render0 \
libxcb-shm0 \
libxcb-shape0 \
libxcb-sync1 \
libxcb-xfixes0 \
libxcb-xkb1 \
libxcb-icccm4 \
libxcb-image0 \
libxcb-keysyms1 \
libxcb-util1 \
libxcb-render-util0 \
libxcb-cursor0 \
libx11-xcb1 \
libc6-dev \
libc6 \
libc-dev-bin \
libv4l-dev \
libjpeg62-turbo-dev \
libx11-dev \
desktop-file-utils \
&& \
rm -rf /var/lib/apt/lists/* && \
apt-get autoremove -y && \
apt-get clean
# create new user to avoid using root; but with sudo access and no password for convenience.
ARG UID=1000
ENV USER="user"
ENV HOME_DIR="/home/${USER}"
ENV WORK_DIR="${HOME_DIR}/wspace" \
PATH="${HOME_DIR}/.local/bin:${PATH}"
RUN useradd --uid $UID --create-home --shell /bin/bash ${USER}
RUN usermod -append --groups sudo ${USER}
RUN echo "%sudo ALL=(ALL) NOPASSWD: ALL" >> /etc/sudoers
WORKDIR ${WORK_DIR}
RUN chown --recursive ${USER} ${WORK_DIR}
USER ${USER}