feature/scel-base (#1)
Some checks reported errors
continuous-integration/drone/push Build is passing
continuous-integration/drone/pr Build is failing
continuous-integration/drone Build was killed

Reviewed-on: https://git.front.kjuulh.io/kjuulh/scel/pulls/1
This commit is contained in:
2022-07-18 13:16:06 +02:00
parent e616179774
commit f4ea2d98ab
13 changed files with 448 additions and 35 deletions

21
Dockerfile Normal file
View File

@@ -0,0 +1,21 @@
FROM rust:1.60 as builder
WORKDIR /usr/src/scel
COPY . .
RUN --mount=type=cache,target=/usr/src/scel/target cargo build --release
RUN --mount=type=cache,target=/usr/src/scel/target cargo install --path src/cmd/scel
FROM debian:bullseye-slim
# Install YTD
RUN rm -f /etc/apt/apt.conf.d/docker-clean; echo 'Binary::apt::APT::Keep-Downloaded-Packages "true";' > /etc/apt/apt.conf.d/keep-cache
RUN --mount=type=cache,target=/var/cache/apt --mount=type=cache,target=/var/lib/apt \
apt-get update && apt-get install -y python3 python3-pip
RUN python3 -m pip install -U yt-dlp
# Copy binary
COPY --from=builder /usr/local/cargo/bin/scel /usr/local/bin/scel
CMD ["scel"]