1
0
mirror of https://git.keinpfusch.net/loweel/zangtumb synced 2024-12-18 09:58:33 +01:00

Add Dockerfile

#Start multistage Docker
#Stage 1 : build brutalinks


FROM golang:latest AS zangbuilder
RUN apt install make  git -y
RUN mkdir -p /go/src/zangtumb
RUN git clone https://git.keinpfusch.net/loweel/zangtumb.git /go/src/zangtumb 
WORKDIR /go/src/zangtumb
ENV GO111MODULE=auto 
RUN go build 


#Start multistage Docker
#Stage 3 : put pieces together

FROM debian:latest 
RUN apt update
RUN apt upgrade -y
RUN apt install ca-certificates -y
RUN mkdir -p /opt/zangtumb
WORKDIR  /opt/zangtumb
COPY --from=zangbuilder /go/src/zangtumb /opt/zangtumb/
ENTRYPOINT ["/opt/zangtumb/zangtumb"]
This commit is contained in:
Uriel Fanelli 2023-06-18 18:00:22 +02:00
parent 885df1c4ab
commit 386c80b6a4

24
Dockerfile Normal file
View File

@ -0,0 +1,24 @@
#Start multistage Docker
#Stage 1 : build brutalinks
FROM golang:latest AS zangbuilder
RUN apt install make git -y
RUN mkdir -p /go/src/zangtumb
RUN git clone https://git.keinpfusch.net/loweel/zangtumb.git /go/src/zangtumb
WORKDIR /go/src/zangtumb
ENV GO111MODULE=auto
RUN go build
#Start multistage Docker
#Stage 2 : put pieces together
FROM debian:latest
RUN apt update
RUN apt upgrade -y
RUN apt install ca-certificates -y
RUN mkdir -p /opt/zangtumb
WORKDIR /opt/zangtumb
COPY --from=zangbuilder /go/src/zangtumb /opt/zangtumb/
ENTRYPOINT ["/opt/zangtumb/zangtumb"]