Update 'Dockerfile'
This commit is contained in:
15
Dockerfile
15
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;
|
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
|
FROM ubuntu:22.04
|
||||||
|
|
||||||
RUN apt-get update && apt-get install ca-certificates -y
|
RUN apt-get update && apt-get install ca-certificates -y
|
||||||
|
|
||||||
|
ENV TZ=Australia/Sydney
|
||||||
|
|
||||||
|
COPY --from=build2 /json2excel /bin/json2excel
|
||||||
|
|
||||||
# DON'T CHANGE BELOW
|
# DON'T CHANGE BELOW
|
||||||
COPY --from=build /application /bin/application
|
COPY --from=build /application /bin/application
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user