Skip to content

Commit 0a3ca9a

Browse files
committed
Docker image is now used to launch the tool, instead of containing the site.
1 parent d15b1c0 commit 0a3ca9a

File tree

2 files changed

+29
-19
lines changed

2 files changed

+29
-19
lines changed

.github/workflows/test-docker.yaml

+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Test Docker Image
2+
3+
on:
4+
pull_request:
5+
branches: main
6+
push:
7+
branches: ["*"]
8+
9+
jobs:
10+
build:
11+
runs-on: ubuntu-latest
12+
13+
steps:
14+
- uses: actions/checkout@v4
15+
16+
- name: Build Docker Image
17+
run: docker build -t ffdocs -f docker/Dockerfile .
18+
19+
- name: Build a Website
20+
run: |
21+
set -xe
22+
23+
out=$(mktemp -d)
24+
docker run --volume "$out:/out" --rm ffdocs -o /out -v 1.0.*
25+
test "$(find "$out" -name '*.html' | wc -l)" -ge 2

docker/Dockerfile

+4-19
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
1-
# Debian Bookworm to build the website.
2-
FROM ruby:3.2-bookworm AS docs
1+
FROM ruby:3.2-bookworm
32

43
RUN \
54
DEBIAN_FRONTEND=noninteractive \
@@ -13,23 +12,9 @@ RUN \
1312
texinfo \
1413
zstd
1514

16-
17-
# Install gems before adding the source code, so they can be reused
18-
# if the pages are rebuilt without changing dependencies.
19-
20-
ENV BUNDLE_FORCE_RUBY_PLATFORM=true
21-
22-
WORKDIR /gemfile
23-
ADD Gemfile .
24-
ADD Gemfile.lock .
25-
RUN bundle install
26-
27-
2815
WORKDIR /app
29-
ADD . .
30-
RUN ./ffmpeg-filters-docs --output /output
3116

17+
ADD . .
18+
RUN bundle install --frozen
3219

33-
# HTTP server.
34-
FROM nginx
35-
COPY --from=docs /output /usr/share/nginx/html
20+
ENTRYPOINT [ "bundle", "exec", "./ffmpeg-filters-docs" ]

0 commit comments

Comments
 (0)