Compare commits
4 commits
677c35a6fd
...
fad24597fd
Author | SHA1 | Date | |
---|---|---|---|
fad24597fd | |||
8147ffd231 | |||
5b2d6653dc | |||
97a7268d4a |
3 changed files with 32 additions and 16 deletions
3
.dockerignore
Normal file
3
.dockerignore
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
**/target/
|
||||||
|
23*/
|
||||||
|
24*/
|
16
.forgejo/workflows/webhook.yml
Normal file
16
.forgejo/workflows/webhook.yml
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
name: Trigger quay.io Webhook
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
run:
|
||||||
|
runs-on: alpine-latest
|
||||||
|
steps:
|
||||||
|
- run: |
|
||||||
|
apk add ca-certificates curl
|
||||||
|
curl -v -X POST --data '{
|
||||||
|
"commit": "${{forgejo.sha}}",
|
||||||
|
"ref": "${{forgejo.ref}}",
|
||||||
|
"default-branch": "main"
|
||||||
|
}' 'https://$token:${{secrets.quay_token}}@quay.io/webhooks/push/trigger/48d15dc7-ef9a-45bd-83e6-e1714c73dca6'
|
29
Dockerfile
29
Dockerfile
|
@ -1,26 +1,24 @@
|
||||||
FROM alpine:3.19 AS builder
|
FROM alpine:3.20
|
||||||
|
|
||||||
RUN apk add --no-cache cargo
|
|
||||||
|
|
||||||
RUN mkdir /src
|
|
||||||
COPY . /src
|
|
||||||
WORKDIR /src
|
|
||||||
|
|
||||||
RUN cargo build --release --no-default-features
|
|
||||||
|
|
||||||
# ##############################################
|
|
||||||
|
|
||||||
FROM alpine:3.19
|
|
||||||
|
|
||||||
ARG ffmpeg_ver=7.0
|
ARG ffmpeg_ver=7.0
|
||||||
|
|
||||||
|
RUN mkdir -p /usr/local/src/render_video
|
||||||
|
COPY LICENSE /usr/local/src/render_video/LICENSE
|
||||||
|
COPY Cargo.toml /usr/local/src/render_video/Cargo.toml
|
||||||
|
COPY Cargo.lock /usr/local/src/render_video/Cargo.lock
|
||||||
|
COPY src /usr/local/src/render_video/src
|
||||||
|
COPY assets /usr/local/src/render_video/assets
|
||||||
|
|
||||||
RUN apk add --no-cache \
|
RUN apk add --no-cache \
|
||||||
dav1d fontconfig freetype harfbuzz librsvg libva lilv-libs opus svt-av1 x264-libs x265 \
|
dav1d fontconfig freetype harfbuzz librsvg libva lilv-libs opus svt-av1 x264-libs x265 \
|
||||||
font-noto inkscape libarchive-tools libgcc \
|
font-noto inkscape libarchive-tools libgcc \
|
||||||
# we install ffmpeg ourselves to get libsvtav1 support which is not part of the alpine package \
|
|
||||||
&& apk add --no-cache --virtual .build-deps \
|
&& apk add --no-cache --virtual .build-deps \
|
||||||
build-base \
|
build-base cargo pkgconf \
|
||||||
dav1d-dev fontconfig-dev freetype-dev harfbuzz-dev librsvg-dev libva-dev lilv-dev opus-dev svt-av1-dev x264-dev x265-dev \
|
dav1d-dev fontconfig-dev freetype-dev harfbuzz-dev librsvg-dev libva-dev lilv-dev opus-dev svt-av1-dev x264-dev x265-dev \
|
||||||
|
# build the render_video project
|
||||||
|
&& cargo install --path /usr/local/src/render_video --root /usr/local --no-default-features \
|
||||||
|
&& rm -rf ~/.cargo \
|
||||||
|
# we install ffmpeg ourselves to get libsvtav1 support which is not part of the alpine package \
|
||||||
&& wget -q https://ffmpeg.org/releases/ffmpeg-${ffmpeg_ver}.tar.bz2 \
|
&& wget -q https://ffmpeg.org/releases/ffmpeg-${ffmpeg_ver}.tar.bz2 \
|
||||||
&& tar xfa ffmpeg-${ffmpeg_ver}.tar.bz2 \
|
&& tar xfa ffmpeg-${ffmpeg_ver}.tar.bz2 \
|
||||||
&& cd ffmpeg-${ffmpeg_ver} \
|
&& cd ffmpeg-${ffmpeg_ver} \
|
||||||
|
@ -63,6 +61,5 @@ RUN apk add --no-cache \
|
||||||
&& install -Dm644 -t /usr/share/licenses/msfonts/ Licen.TXT \
|
&& install -Dm644 -t /usr/share/licenses/msfonts/ Licen.TXT \
|
||||||
&& cd .. \
|
&& cd .. \
|
||||||
&& rm -r msfonts webfonts.tar.gz
|
&& rm -r msfonts webfonts.tar.gz
|
||||||
COPY --from=builder /src/target/release/render_video /usr/local/bin/render_video
|
|
||||||
|
|
||||||
ENTRYPOINT ["/usr/local/bin/render_video"]
|
ENTRYPOINT ["/usr/local/bin/render_video"]
|
||||||
|
|
Loading…
Reference in a new issue