diff --git a/asciinema/Dockerfile b/asciinema/Dockerfile
new file mode 100644
index 0000000..6b5822e
--- /dev/null
+++ b/asciinema/Dockerfile
@@ -0,0 +1,26 @@
+FROM ghcr.io/asciinema/asciinema-server:latest AS base
+
+# Download the source to find and patch the template
+FROM elixir:1.18-alpine AS builder
+
+# Install git and build dependencies
+RUN apk add --no-cache git build-base nodejs npm
+
+# Clone the asciinema-server repository
+WORKDIR /app
+RUN git clone https://github.com/asciinema/asciinema-server.git .
+RUN git checkout v1.0.0
+
+# Patch the layout template to inject custom theme
+RUN sed -i '/<\/head>/i\ \n \n ' \
+ lib/asciinema_web/templates/layout/app.html.heex
+
+# Build the release
+RUN mix local.hex --force && \
+ mix local.rebar --force && \
+ mix deps.get --only prod && \
+ MIX_ENV=prod mix do compile, assets.deploy, release
+
+# Final image: copy the patched release over the base image
+FROM base
+COPY --from=builder /app/_build/prod/rel/asciinema /opt/app/
diff --git a/asciinema/compose.yaml b/asciinema/compose.yaml
index fef5cab..46ed47c 100644
--- a/asciinema/compose.yaml
+++ b/asciinema/compose.yaml
@@ -8,7 +8,7 @@ services:
volumes:
- asciinema_data:/var/opt/asciinema
- ./custom.exs:/opt/app/etc/custom.exs:ro
- - ./theme/custom.css:/opt/app/lib/asciinema-1.0.0/priv/static/css/custom.css:ro
+ - ./theme/custom.css:/opt/app/lib/asciinema-1.0.0/priv/static/assets/custom.css:ro
- ./theme/favicon.svg:/opt/app/lib/asciinema-1.0.0/priv/static/images/favicon-custom.svg:ro
- ./theme/custom.js:/opt/app/lib/asciinema-1.0.0/priv/static/js/custom.js:ro
environment:
diff --git a/asciinema/theme/custom.js b/asciinema/theme/custom.js
index 9a6a4b6..3ea1542 100644
--- a/asciinema/theme/custom.js
+++ b/asciinema/theme/custom.js
@@ -3,7 +3,7 @@
// Inject custom CSS
var customCSS = document.createElement('link');
customCSS.rel = 'stylesheet';
- customCSS.href = '/css/custom.css';
+ customCSS.href = '/assets/custom.css';
document.head.appendChild(customCSS);
// Inject custom favicon