diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..720a21d --- /dev/null +++ b/Dockerfile @@ -0,0 +1,26 @@ +#bookworm refers to the debian version +FROM voidlinux/voidlinux + +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 + +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 +#RUN rustfmt --check /home/lemoa/lemoa +#These might be useful for wasm deployments in the future. +#RUN rustup target add wasm32-unknown-unknown + +#CMD cd /home/lemoa/lemoa && cargo build diff --git a/README.md b/README.md index 80e3a37..d7924d4 100644 --- a/README.md +++ b/README.md @@ -39,5 +39,13 @@ Clone the repository and run cargo run ``` +# Building with Docker +``` +sudo docker build --no-cache . -t lemoa:latest +CONTAINER_ID=$(sudo docker create --name lemoa -t lemoa:latest) +sudo docker cp $(CONTAINER_ID):/root/lemoa/target/release/lemoa . +``` +Once the build is done, there will be an executable `lemoa` binary file in your current directory, executing it starts Lemoa :tada:. + # License Lemoa is licensed under the [**GNU General Public License**](https://www.gnu.org/licenses/gpl.html): You can use, study and share it as you want.