1
0
Fork 0
mirror of synced 2024-05-11 16:02:44 +12:00

Build with Docker (#562)

This commit is contained in:
Alexis Lefebvre 2022-01-06 21:31:44 +01:00 committed by GitHub
parent 74e4ab5263
commit 277bb8b39a
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 30 additions and 1 deletions

View file

@ -43,6 +43,12 @@ Next install Rust from site https://rustup.rs/
After that the latest GTK 3 runtime must be installed from https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases After that the latest GTK 3 runtime must be installed from https://github.com/tschoonj/GTK-for-Windows-Runtime-Environment-Installer/releases
--> -->
### Docker
```shell
docker build ./misc/docker/ --tag cargo-gtk
```
## Compilation ## Compilation
Czkawka can be installed with Debug or Release build. Czkawka can be installed with Debug or Release build.
@ -65,6 +71,17 @@ cargo run --release --bin czkawka_gui
cargo run --release --bin czkawka_cli cargo run --release --bin czkawka_cli
``` ```
## Compilation with Docker
```shell
docker run -t --rm --volume $PWD:/app --workdir /app cargo-gtk cargo build --release --bin czkawka_gui
```
Run the binary:
```shell
target/release/czkawka_gui
```
## Additional features ## Additional features
For now, finding broken audio files is temporary disabled by default, because it crashes when audio libraries are not found on the computer. For now, finding broken audio files is temporary disabled by default, because it crashes when audio libraries are not found on the computer.
@ -73,4 +90,4 @@ I'm waiting for ability to disable audio playback feature, so after that I will
To enable checking for broken audio files, just add ` --all-features` To enable checking for broken audio files, just add ` --all-features`
``` ```
cargo run --all-features --bin czkawka_cli -- broken -d /home/rafal/ -f "results.txt" cargo run --all-features --bin czkawka_cli -- broken -d /home/rafal/ -f "results.txt"
``` ```

12
misc/docker/Dockerfile Normal file
View file

@ -0,0 +1,12 @@
FROM debian:11
# curl is needed by Rust update tool
RUN apt-get update \
&& apt-get install -y curl build-essential libgtk-3-dev \
&& apt-get clean ; rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* /usr/share/doc/*
RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y # Download the latest stable Rust
ENV PATH="/root/.cargo/bin:${PATH}"
RUN cargo --version