1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-09-19 10:50:11 +00:00
jfa-go/Dockerfile

33 lines
1.1 KiB
Docker
Raw Normal View History

# Use this instead if hrfee/jfa-go-build-docker doesn't support your architecture
# FROM --platform=$BUILDPLATFORM golang:latest AS support
FROM --platform=$BUILDPLATFORM hrfee/jfa-go-build-docker AS support
2020-08-03 18:45:10 +00:00
COPY . /opt/build
2020-08-03 18:45:10 +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
RUN (cd /opt/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
2020-08-03 18:45:10 +00:00
FROM --platform=$BUILDPLATFORM golang:latest AS build
ARG TARGETARCH
ENV GOARCH=$TARGETARCH
COPY --from=support /opt/build /opt/build
RUN (cd /opt/build; make compile INTERNAL=off UPDATER=docker)
FROM golang:latest
2020-08-03 18:45:10 +00:00
COPY --from=build /opt/build/build /opt/jfa-go
2020-08-03 18:45:10 +00:00
EXPOSE 8056
EXPOSE 8057
2020-08-03 18:45:10 +00:00
CMD [ "/opt/jfa-go/jfa-go", "-data", "/data" ]