File tree Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Expand file tree Collapse file tree 1 file changed +7
-2
lines changed Original file line number Diff line number Diff line change 11# get latest golang container
22FROM golang:1.17.5
33
4+ # get args
5+ ARG TibiadataBuildBuilder=dockerfile
6+ ARG TibiadataBuildRelease=unknown
7+ ARG TibiadataBuildCommit=-
8+
49# create and set workingfolder
510WORKDIR /go/src/
611
@@ -14,7 +19,7 @@ RUN go mod download
1419COPY src/ .
1520
1621# compile the program
17- RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -o app .
22+ RUN CGO_ENABLED=0 GOOS=linux go build -a -installsuffix cgo -ldflags= "-w -s -X 'main.TibiadataBuildBuilder=${TibiadataBuildBuilder}' -X 'main.TibiadataBuildRelease=${TibiadataBuildRelease}' -X 'main.TibiadataBuildCommit=${TibiadataBuildCommit}'" - o app .
1823
1924
2025# get latest alpine container
@@ -33,4 +38,4 @@ COPY --from=0 /go/src/app .
3338EXPOSE 8080
3439
3540# run application
36- CMD ["./app" ]
41+ CMD ["./app" ]
You can’t perform that action at this time.
0 commit comments