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

Added alpine and debian dockerfiles

This commit is contained in:
Harvey Tindall 2020-08-03 19:45:10 +01:00
parent 54af15cc5a
commit 7b23545197
Signed by: hrfee
GPG Key ID: BBC65952848FB1A2
2 changed files with 58 additions and 0 deletions

25
Dockerfile Normal file
View File

@ -0,0 +1,25 @@
FROM golang:alpine
RUN apk update
RUN apk add --update make py3-pip curl sed npm build-base python3-dev
ADD . / /opt/build/
RUN (cd /opt/build; make all)
RUN mv /opt/build/build /opt/jfa-go
RUN rm -rf /opt/build
RUN sed -i 's#id="pwrJfPath" placeholder="Folder"#id="pwrJfPath" value="/jf" disabled#g' /opt/jfa-go/data/templates/setup.html
RUN apk del py3-pip python3-dev build-base python3 nodejs npm
RUN (rm -rf /go; rm -rf /usr/local/go)
EXPOSE 8056
CMD [ "/opt/jfa-go/jfa-go", "-data", "/data" ]

33
dockerfile-debian Normal file
View File

@ -0,0 +1,33 @@
FROM golang:latest
RUN apt update -y
RUN apt install build-essential python3-pip curl software-properties-common sed -y
RUN (curl -sL https://deb.nodesource.com/setup_14.x | bash -)
RUN apt install nodejs
ADD . / /opt/build/
RUN (cd /opt/build; make all)
RUN mv /opt/build/build /opt/jfa-go
RUN rm -rf /opt/build
RUN sed -i 's#id="pwrJfPath" placeholder="Folder"#id="pwrJfPath" value="/jf" disabled#g' /opt/jfa-go/data/templates/setup.html
RUN apt remove python3-pip python3 nodejs -y
RUN apt purge python3-minimal nodejs -y
RUN apt autoremove -y
RUN rm -rf /usr/local/go /go
EXPOSE 8056
CMD [ "/opt/jfa-go/jfa-go", "-data", "/data" ]