1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-12-23 09:30:12 +00:00

Update Dockerfile

This commit is contained in:
Aleksa Siriški 2023-01-30 17:56:29 +01:00
parent ac25c9cd7f
commit 7c1641d516

View File

@ -1,30 +1,31 @@
FROM --platform=$BUILDPLATFORM golang:latest AS support FROM --platform=$BUILDPLATFORM golang:latest AS support
COPY . /opt/build COPY . /var/build
RUN apt-get update -y \ RUN apt-get update -y \
&& apt-get install build-essential python3-pip curl software-properties-common sed -y \ && apt-get install build-essential python3-pip curl software-properties-common sed -y \
&& (curl -sL https://deb.nodesource.com/setup_current.x | bash -) \ && (curl -sL https://deb.nodesource.com/setup_current.x | bash -) \
&& apt-get install nodejs \ && apt-get install nodejs \
&& (cd /opt/build; make configuration npm email typescript variants-html bundle-css inline-css swagger copy INTERNAL=off GOESBUILD=on) \ && (cd /var/build; make configuration npm email typescript variants-html bundle-css inline-css swagger copy INTERNAL=off GOESBUILD=on) \
&& 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' /var/build/build/data/html/setup.html
FROM --platform=$BUILDPLATFORM golang:latest AS build FROM --platform=$BUILDPLATFORM golang:latest AS build
ARG TARGETARCH ARG TARGETARCH
ENV GOARCH=$TARGETARCH ENV GOARCH=$TARGETARCH
COPY --from=support /opt/build /opt/build COPY --from=support /var/build /var/build
RUN (cd /opt/build; make compile INTERNAL=off UPDATER=docker) RUN (cd /var/build; make compile INTERNAL=off UPDATER=docker)
FROM golang:latest FROM golang:latest
COPY --from=build /opt/build/build /opt/jfa-go COPY --from=build /var/build/build /usr/bin/jfa-go
EXPOSE 8056 EXPOSE 8056
EXPOSE 8057 EXPOSE 8057
CMD [ "/opt/jfa-go/jfa-go", "-data", "/data" ] VOLUME /config
ENTRYPOINT ["/usr/bin/jfa-go/jfa-go", \
"-data", "/config"]