-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathDockerfile
More file actions
41 lines (33 loc) · 1.78 KB
/
Copy pathDockerfile
File metadata and controls
41 lines (33 loc) · 1.78 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM --platform=${BUILDPLATFORM} alpine:3.24.1@sha256:28bd5fe8b56d1bd048e5babf5b10710ebe0bae67db86916198a6eec434943f8b AS build
WORKDIR /build
# Renovate updates the URLs below.
ADD --chmod=0444 \
https://matcha.mizu.sh/v/3.0.0/matcha.css \
https://raw.githubusercontent.com/Templarian/MaterialDesign-Webfont/refs/tags/v7.4.47/css/materialdesignicons.min.css \
https://unpkg.com/xp.css@0.2.3/dist/XP.css \
https://unpkg.com/xp.css@0.2.3/dist/ms_sans_serif.woff \
https://unpkg.com/xp.css@0.2.3/dist/ms_sans_serif.woff2 \
./css/
ADD --chmod=0444 \
https://raw.githubusercontent.com/Templarian/MaterialDesign-Webfont/refs/tags/v7.4.47/fonts/materialdesignicons-webfont.eot \
https://raw.githubusercontent.com/Templarian/MaterialDesign-Webfont/refs/tags/v7.4.47/fonts/materialdesignicons-webfont.ttf \
https://raw.githubusercontent.com/Templarian/MaterialDesign-Webfont/refs/tags/v7.4.47/fonts/materialdesignicons-webfont.woff \
https://raw.githubusercontent.com/Templarian/MaterialDesign-Webfont/refs/tags/v7.4.47/fonts/materialdesignicons-webfont.woff2 \
./fonts/
ADD --chmod=0444 \
https://raw.githubusercontent.com/nadiamoe/owo.cafe/refs/heads/main/assets/owocafe-88x31.gif \
./images/88x31/buttons/
COPY dot-well-known/ .well-known/
COPY images/ images/
COPY index.html ad.html robots.txt ./
ARG GIT_REF=main
RUN <<EOF
git_ref_short=$(printf "%.8s" ${GIT_REF})
sed -i "s/__GIT_REF__/${GIT_REF}/g" index.html
sed -i "s/__GIT_REF_SHORT__/${git_ref_short}/g" index.html
EOF
# Fix folder permissions, which apparently docker now creates without the exec bit.
RUN find -type d -perm -004 -print0 | xargs -0 chmod +rx
FROM nginx:1.31.3-alpine@sha256:4a73073bd557c65b759505da037898b61f1be6cbcc3c2c3aeac22d2a470c1752
COPY nginx.conf /etc/nginx/
COPY --from=build /build /usr/share/nginx/html/