fix Dockerfile
All checks were successful
continuous-integration/drone/push Build is passing

This commit is contained in:
2024-02-16 20:26:44 +01:00
parent 18c380930f
commit abba563d23

View File

@@ -12,9 +12,10 @@ RUN echo "fn main() {}" > src/main.rs
COPY Cargo.toml ./ COPY Cargo.toml ./
COPY Cargo.lock ./ COPY Cargo.lock ./
RUN cargo build --release --locked RUN cargo build --release --locked
RUN rm /app/target/release/ohrwurm
COPY . . COPY . .
RUN cargo build --release --locked RUN cargo build --release --locked && cp /app/target/release/ohrwurm /ohrwurm
# Release image # Release image
FROM debian:bullseye-slim FROM debian:bullseye-slim
@@ -22,6 +23,6 @@ FROM debian:bullseye-slim
RUN apt-get update && apt-get install -y python3-pip ffmpeg RUN apt-get update && apt-get install -y python3-pip ffmpeg
RUN pip install -U yt-dlp RUN pip install -U yt-dlp
COPY --from=build /app/target/release/ohrwurm . COPY --from=build /ohrwurm .
CMD ["./ohrwurm"] CMD ["./ohrwurm"]