diff --git a/Dockerfile b/Dockerfile index b5b9dad..241a670 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,15 +1,33 @@ -# Based on: https://github.com/flatpak/flatpak-docker-images/blob/master/Dockerfile +# Based on: https://github.com/ebassi/flathub-docker/blob/master/base/Dockerfile -FROM fedora:41 -VOLUME /build -WORKDIR /build -ENV FLATPAK_GL_DRIVERS=dummy -RUN dnf -y update && \ - dnf install -y flatpak-builder ostree fuse elfutils dconf git bzr p7zip xmlstarlet bzip2 curl jq && \ - dnf clean all +FROM debian:stretch-slim -RUN flatpak remote-add flathub https://dl.flathub.org/repo/flathub.flatpakrepo -RUN flatpak remote-add flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo +RUN echo "deb-src http://httpredir.debian.org/debian stretch main" >> /etc/apt/sources.list + +RUN apt-get update -qq && \ + apt-get install -qq -y --no-install-recommends \ + flatpak \ + git-core \ + locales \ + make && \ + p7zip \ + xmlstarlet \ + bzip2 \ + curl \ + jq \ + rm -rf /usr/share/doc/* /usr/share/man/* + +RUN locale-gen C.UTF-8 && /usr/sbin/update-locale LANG=C.UTF-8 + +ENV LANG=C.UTF-8 LANGUAGE=C.UTF-8 LC_ALL=C.UTF-8 + +COPY flatpak-build.sh /root +RUN chmod +x /root/flatpak-build.sh + +RUN /root/flatpak-build.sh + +RUN flatpak remote-add --if-not-exists flathub https://dl.flathub.org/repo/flathub.flatpakrepo +RUN flatpak remote-add --if-not-exists flathub-beta https://flathub.org/beta-repo/flathub-beta.flatpakrepo +RUN flatpak remote-add --if-not-exists gnome https://sdk.gnome.org/gnome.flatpakrepo -# Set default command (optional, for testing purposes) ENTRYPOINT [ "flatpak-builder" ] \ No newline at end of file diff --git a/flatpak-build.sh b/flatpak-build.sh new file mode 100644 index 0000000..89a8103 --- /dev/null +++ b/flatpak-build.sh @@ -0,0 +1,86 @@ +#!/bin/bash + +apt-get build-dep -qq -y --no-install-recommends \ + ostree \ + flatpak + +git clone --recursive https://github.com/ostreedev/ostree /root/ostree && \ + cd /root/ostree && \ + ./autogen.sh \ + --prefix /usr \ + --sysconfdir /etc \ + --libdir /usr/lib/x86_64-linux-gnu \ + --libexecdir /usr/bin \ + --localstatedir /var \ + --disable-silent-rules \ + --disable-gtk-doc \ + --disable-man \ + --with-dracut \ + --with-grub2 \ + --with-grub2-mkconfig-path=/usr/sbin/grub-mkconfig \ + --with-systemdsystemunitdir=/lib/systemd/system && \ + make && make install && \ + rm -f /usr/lib/*/*.la && \ + cd /root && \ + rm -rf /root/ostree + +git clone --recursive https://github.com/flatpak/flatpak /root/flatpak && \ + cd /root/flatpak && \ + ./autogen.sh \ + --prefix /usr \ + --sysconfdir /etc \ + --libdir /usr/lib/x86_64-linux-gnu \ + --libexecdir /usr/bin \ + --localstatedir /var \ + --disable-silent-rules \ + --disable-docbook-docs \ + --disable-gtk-doc \ + --disable-installed-tests \ + --disable-documentation \ + --with-priv-mode=none \ + --with-privileged-group=sudo \ + --with-systemdsystemunitdir=/lib/systemd/system && \ + make && make install && \ + rm -f /usr/lib/*/*.la && \ + cd /root && \ + rm -rf /root/flatpak + +apt-get remove -y --purge \ + adwaita-icon-theme \ + autotools-dev \ + bison \ + build-essential \ + debhelper \ + docbook \ + docbook-to-man \ + docbook-xml \ + docbook-xsl \ + fontconfig \ + hicolor-icon-theme \ + highlight \ + highlight-common \ + intltool-debian \ + libcairo-gobject2 \ + libcairo2 \ + libepoxy0 \ + libfontconfig1 \ + libharfbuzz0b \ + libgtk-3-0 \ + libicu-dev \ + man-db \ + python \ + python2.7 \ + python2.7-minimal \ + python3 \ + python3.5 \ + python3.5-minimal \ + sgml-base \ + sgml-data \ + xml-core \ + xmlto \ + xorg-sgml-doctools \ + xsltproc + +apt autoremove -y + +rm -rf /usr/share/doc/* /usr/share/man/* \ No newline at end of file