Update 'Dockerfile'

This commit is contained in:
2023-02-10 15:19:54 +11:00
parent 329f1e518c
commit 7197c1c857

View File

@@ -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