From 7197c1c857801d23525b56b7ef5fcf750adf6c3f Mon Sep 17 00:00:00 2001 From: nathan Date: Fri, 10 Feb 2023 15:19:54 +1100 Subject: [PATCH] Update 'Dockerfile' --- Dockerfile | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/Dockerfile b/Dockerfile index a3ae3a6..182ff29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -15,10 +15,25 @@ ENV CGO_LDFLAGS "-static -w -s" RUN go build -tags osusergo,netgo -o /application cmd/export-xlsx-server/main.go; +FROM golang:1.18.2-alpine as build2 + +WORKDIR /src + +ENV CGO_LDFLAGS "-static -w -s" + +RUN git clone https://git.coadcorp.com/nathan/json2excel.git && \ + cd json2excel && \ + go mod download && \ + go build -o /json2excel cmd/main/main.go + FROM ubuntu:22.04 RUN apt-get update && apt-get install ca-certificates -y +ENV TZ=Australia/Sydney + +COPY --from=build2 /json2excel /bin/json2excel + # DON'T CHANGE BELOW COPY --from=build /application /bin/application