1
0
mirror of https://github.com/hrfee/jfa-go.git synced 2024-11-13 05:40:10 +00:00
jfa-go/Dockerfile
Harvey Tindall abc51f2443
Shrunk dockerfile
Dockerfile now has separate build stage, and uses debian. Image now
sits at ~300MB.
2020-08-17 11:32:34 +01:00

21 lines
557 B
Docker

FROM golang:latest AS build
COPY . /opt/build
RUN apt update -y \
&& apt install build-essential python3-pip curl software-properties-common sed -y \
&& (curl -sL https://deb.nodesource.com/setup_14.x | bash -) \
&& apt install nodejs \
&& (cd /opt/build; make headless) \
&& sed -i 's#id="pwrJfPath" placeholder="Folder"#id="pwrJfPath" value="/jf" disabled#g' /opt/build/build/data/templates/setup.html
FROM golang:latest
COPY --from=build /opt/build/build /opt/jfa-go
EXPOSE 8056
CMD [ "/opt/jfa-go/jfa-go", "-data", "/data" ]