build: Update dockerfile for new Makefile

added a "precompile" step which takes the place of the "configuration
email swager..." stuff.
This commit is contained in:
Harvey Tindall
2024-08-06 20:34:28 +01:00
parent 2310130e6b
commit 790accc007
4 changed files with 8 additions and 10 deletions

View File

@@ -1,6 +1,6 @@
# 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
FROM --platform=$BUILDPLATFORM docker.io/hrfee/jfa-go-build-docker:latest AS support
COPY . /opt/build
@@ -9,10 +9,10 @@ COPY . /opt/build
# && 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) \
RUN (cd /opt/build; npm i; make precompile 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
FROM --platform=$BUILDPLATFORM golang:latest AS build
FROM --platform=$BUILDPLATFORM docker.io/golang:latest AS build
ARG TARGETARCH
ENV GOARCH=$TARGETARCH
ARG BUILT_BY
@@ -30,5 +30,3 @@ EXPOSE 8056
EXPOSE 8057
CMD [ "/opt/jfa-go/jfa-go", "-data", "/data" ]