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

compress executable in dockerfile

This commit is contained in:
Harvey Tindall 2020-09-02 20:10:33 +01:00
parent 17994352b1
commit 46c95d7664
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2

View File

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