1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-22 17:10:10 +00:00

build: fix dockerfile for E2EE

This commit is contained in:
Harvey Tindall 2024-08-10 21:43:16 +01:00
parent 2237286656
commit cf5ec3b319
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
2 changed files with 6 additions and 6 deletions

View File

@ -26,8 +26,8 @@ builds:
dir: ./ dir: ./
env: env:
- CGO_ENABLED=1 - CGO_ENABLED=1
- CC={{ if eq .Arch "amd64" }}x86_64{{ else }}{{ .Arch }}{{ end }}-linux-gnu{{ if eq .Arch "arm" }}eabihf{{ end }}-gcc - CC={{ if eq .Arch "amd64" }}x86_64{{ else if eq .Arch "arm64" }}aarch64{{ else }}{{ .Arch }}{{ end }}-linux-gnu{{ if eq .Arch "arm" }}eabihf{{ end }}-gcc
- CXX={{ if eq .Arch "amd64" }}x86_64{{ else }}{{ .Arch }}{{ end }}-linux-gnu{{ if eq .Arch "arm" }}eabihf{{ end }}-gcc - CXX={{ if eq .Arch "amd64" }}x86_64{{ else if eq .Arch "arm64" }}aarch64{{ else }}{{ .Arch }}{{ end }}-linux-gnu{{ if eq .Arch "arm" }}eabihf{{ end }}-gcc
- GOARM={{ if eq .Arch "arm" }}7{{ end }} - GOARM={{ if eq .Arch "arm" }}7{{ end }}
flags: flags:
- -tags=e2ee - -tags=e2ee

View File

@ -12,19 +12,19 @@ COPY . /opt/build
RUN (cd /opt/build; npm i; make precompile INTERNAL=off GOESBUILD=off) \ RUN (cd /opt/build; npm i; make precompile INTERNAL=off GOESBUILD=off) \
&& sed -i 's#id="password_resets-watch_directory" placeholder="/config/jellyfin"#id="password_resets-watch_directory" value="/jf" disabled#g' /opt/build/build/data/html/setup.html && sed -i 's#id="password_resets-watch_directory" placeholder="/config/jellyfin"#id="password_resets-watch_directory" value="/jf" disabled#g' /opt/build/build/data/html/setup.html
FROM --platform=$BUILDPLATFORM docker.io/golang:latest AS build
ARG TARGETARCH ARG TARGETARCH
ENV GOARCH=$TARGETARCH ENV GOARCH=$TARGETARCH
ARG BUILT_BY ARG BUILT_BY
ENV BUILTBY=$BUILT_BY ENV BUILTBY=$BUILT_BY
COPY --from=support /opt/build /opt/build RUN apt-get update -y && apt-get install libolm-dev -y
RUN (cd /opt/build; make compile INTERNAL=off UPDATER=docker) RUN (cd /opt/build; make compile INTERNAL=off UPDATER=docker)
FROM golang:latest FROM golang:bookworm
COPY --from=build /opt/build/build /opt/jfa-go RUN apt-get update -y && apt-get install libolm-dev -y
COPY --from=support /opt/build/build /opt/jfa-go
EXPOSE 8056 EXPOSE 8056
EXPOSE 8057 EXPOSE 8057