All checks were successful
renovate / renovate (push) Successful in 33s
tests / fmt (push) Successful in 54s
tests / build (push) Successful in 50s
tests / test (push) Successful in 1m32s
tests / pre-commit (push) Successful in 1m50s
tests / clippy (push) Successful in 2m9s
deploy / release-image (push) Successful in 3m57s
29 lines
771 B
Docker
29 lines
771 B
Docker
# Build image
|
|
FROM rust:slim-bullseye@sha256:e94e2d2e0a9df48fdfcacb47d8b60d036abe60b7c6fa3ac3de1dd16a3d18f19a as build
|
|
|
|
RUN apt-get update && apt-get install -y \
|
|
build-essential autoconf automake cmake libtool libssl-dev pkg-config
|
|
|
|
WORKDIR "/app"
|
|
|
|
# Cache dependencies
|
|
COPY Cargo.toml Cargo.lock .
|
|
RUN mkdir src \
|
|
&& echo 'fn main() { panic!("Dummy function called!"); }' > ./src/main.rs
|
|
RUN cargo build --release --locked
|
|
|
|
# Build
|
|
COPY . .
|
|
RUN touch src/main.rs
|
|
RUN cargo build --release --locked
|
|
|
|
# Release image
|
|
FROM debian:bullseye-slim@sha256:33b7c2e071c29e618182ec872c471f39d2dde3d8904d95f5b7a61acf3a592e7b
|
|
|
|
RUN apt-get update && apt-get install -y python3-pip
|
|
RUN pip install -U yt-dlp
|
|
|
|
COPY --from=build /app/target/release/ohrwurm .
|
|
|
|
CMD ["./ohrwurm"]
|