Merge pull request #2 from thebigG/dockerfile

Add dockerfile and build instructions for it
This commit is contained in:
Bnyro 2023-06-20 11:09:28 +02:00 committed by GitHub
commit 98b621929a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 34 additions and 0 deletions

26
Dockerfile Normal file
View File

@ -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

View File

@ -39,5 +39,13 @@ Clone the repository and run
cargo 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 # 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. 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.