Skip to content

Commit

Permalink
改用官方方案
Browse files Browse the repository at this point in the history
  • Loading branch information
Felix2yu committed Feb 21, 2024
1 parent 7f5ffce commit f6b66e7
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/bilibili-webhook.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ jobs:
uses: docker/build-push-action@v5
with:
context: ./bilibili-webhook
platforms: linux/amd64,linux/arm64
platforms: linux/amd64
push: ${{ github.event_name != 'pull_request' }}
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
12 changes: 8 additions & 4 deletions bilibili-webhook/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,19 +6,23 @@ RUN apk add -qq --repository=https://dl-cdn.alpinelinux.org/alpine/edge/communit
git clone https://github.com/LJason77/bilibili-webhook /app && \
RUSTFLAGS="-C target-cpu=native" cargo build --release -q

FROM siguremo/yutto:latest
FROM alpine:latest
LABEL org.opencontainers.image.source = "https://github.com/Felix2yu/docker_build" \
maintainer="Felix2yu <yufei.im@icloud.com>" \
org.opencontainers.image.authors="Felix2yu <yufei.im@icloud.com>"

ENV TZ=Asia/Shanghai

WORKDIR /app
COPY --from=builder /app/target/release/bilibili-webhook /usr/local/bin/
COPY --from=builder /app/log.yml .

RUN adduser -D -s /bin/sh -u 1000 -G users pi && chown -R pi:users .
RUN apk add -qq --update --no-cache --virtual .build-deps gcc g++ python3-dev libc-dev libffi-dev && \
apk add -qq --update --no-cache tzdata ffmpeg python3 py3-pip sqlite-dev libc6-compat && \
pip3 install --no-cache-dir yutto --pre --break-system-packages && \
apk del --purge .build-deps
# adduser -D -s /bin/sh -u 1000 -G users pi && chown -R pi:users .

USER pi
#USER pi

VOLUME ["/app/config", "/app/downloads"]

Expand Down

0 comments on commit f6b66e7

Please sign in to comment.