2024-07-26 11:45:24 +00:00
|
|
|
# Use this instead if hrfee/jfa-go-build-docker doesn't support your architecture
|
|
|
|
# FROM --platform=$BUILDPLATFORM golang:latest AS support
|
2024-08-06 19:34:28 +00:00
|
|
|
FROM --platform=$BUILDPLATFORM docker.io/hrfee/jfa-go-build-docker:latest AS support
|
2020-08-03 18:45:10 +00:00
|
|
|
|
2020-08-17 10:32:34 +00:00
|
|
|
COPY . /opt/build
|
2020-08-03 18:45:10 +00:00
|
|
|
|
2024-07-26 11:45:24 +00:00
|
|
|
# Uncomment this if hrfee/jfa-go-build-docker doesn't support your architecture
|
|
|
|
# RUN apt-get update -y \
|
|
|
|
# && apt-get install build-essential python3-pip -y \
|
|
|
|
# && (curl -sL https://deb.nodesource.com/setup_current.x | bash -) \
|
|
|
|
# && apt-get install nodejs
|
2024-08-06 19:45:11 +00:00
|
|
|
RUN (cd /opt/build; npm i; make precompile INTERNAL=off GOESBUILD=off) \
|
2021-02-17 22:02:26 +00:00
|
|
|
&& 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
|
2020-08-03 18:45:10 +00:00
|
|
|
|
2024-08-06 19:34:28 +00:00
|
|
|
FROM --platform=$BUILDPLATFORM docker.io/golang:latest AS build
|
2021-02-16 16:08:53 +00:00
|
|
|
ARG TARGETARCH
|
|
|
|
ENV GOARCH=$TARGETARCH
|
2024-07-26 15:24:41 +00:00
|
|
|
ARG BUILT_BY
|
|
|
|
ENV BUILTBY=$BUILT_BY
|
2021-02-16 16:08:53 +00:00
|
|
|
|
|
|
|
COPY --from=support /opt/build /opt/build
|
|
|
|
|
2021-04-01 13:22:11 +00:00
|
|
|
RUN (cd /opt/build; make compile INTERNAL=off UPDATER=docker)
|
2021-02-16 16:08:53 +00:00
|
|
|
|
2020-08-17 10:32:34 +00:00
|
|
|
FROM golang:latest
|
2020-08-03 18:45:10 +00:00
|
|
|
|
2020-08-17 10:32:34 +00:00
|
|
|
COPY --from=build /opt/build/build /opt/jfa-go
|
2020-08-03 18:45:10 +00:00
|
|
|
|
|
|
|
EXPOSE 8056
|
2021-02-17 16:04:25 +00:00
|
|
|
EXPOSE 8057
|
2020-08-03 18:45:10 +00:00
|
|
|
|
|
|
|
CMD [ "/opt/jfa-go/jfa-go", "-data", "/data" ]
|