Switch Dockerfile to using void linux for better compile times

This commit is contained in:
Bnyro
2023-06-20 11:09:12 +02:00
parent ef0c99db0b
commit 6ef57d3c9f
2 changed files with 19 additions and 31 deletions

View File

@@ -1,30 +1,21 @@
#bookworm refers to the debian version
FROM rust:bookworm
FROM voidlinux/voidlinux
RUN apt update && \
apt-get -y install clang && \
apt-get -y install libclang-dev && \
apt-get install -y sudo && \
apt-get install -y libgtk-4-dev && \
apt-get install -y libadwaita-1-0 && \
apt-get install -y meson && \
apt-get install -y ninja-build && \
apt-get install -y git && \
apt-get install -y valac && \
apt-get install -y gettext
RUN xbps-install -Syu xbps
RUN xbps-install -Syu && \
xbps-install -y base-devel && \
xbps-install -y clang && \
xbps-install -y pkg-config && \
xbps-install -y gtk4-devel && \
xbps-install -y libadwaita-devel && \
xbps-install -y rust && \
xbps-install -y cargo && \
xbps-install -y git
RUN echo '%sudo ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers
RUN useradd -ms /bin/bash -G sudo lemoa
USER lemoa
WORKDIR /home/lemoa
RUN git clone --recursive https://gitlab.gnome.org/GNOME/libadwaita.git
RUN cd /home/lemoa/libadwaita && git checkout 1.2.0
RUN cd /home/lemoa/libadwaita && sudo meson . _build
RUN cd /home/lemoa/libadwaita && sudo ninja -C _build
RUN cd /home/lemoa/libadwaita && sudo ninja -C _build install
RUN mkdir lemoa_volume
WORKDIR /root
RUN git clone https://github.com/lemmy-gtk/lemoa
RUN cd lemoa && \
cargo build --release
#COPY --chown=lemoa:lemoa . /home/lemoa/lemoa
#RUN rustup component add rustfmt