-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathDockerfile
More file actions
36 lines (23 loc) · 868 Bytes
/
Dockerfile
File metadata and controls
36 lines (23 loc) · 868 Bytes
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
FROM jekyll/jekyll as jekyllbuilder
COPY --chown=1000:1000 . /site
WORKDIR /site
RUN jekyll build --trace && \
mkdir -p _site/en/css _site/ru/css && \
cp css/*.css _site/en/css/ && \
cp css/*.css _site/ru/css/ && \
find _site/en -name "*.html" -exec sed -i 's|href="/en/|href="/|g' {} \; && \
find _site/en -name "*.html" -exec sed -i 's|src="/en/|src="/|g' {} \; && \
find _site/ru -name "*.html" -exec sed -i 's|href="/ru/|href="/|g' {} \; && \
find _site/ru -name "*.html" -exec sed -i 's|src="/ru/|src="/|g' {} \;
FROM golang:1.25-alpine as gobuilder
WORKDIR /app
COPY server/main.go .
COPY --from=jekyllbuilder /site/_site ./site
RUN CGO_ENABLED=0 GOOS=linux go build -ldflags="-s -w" -o /server main.go
FROM scratch
COPY --from=gobuilder /server /server
ENV LANG=en
ENV REDIRECTS=""
ENV PORT=80
EXPOSE 80
CMD ["/server"]