This commit is contained in:
2025-01-05 11:13:23 -05:00
parent d3e7d3f30d
commit af8edad114
5 changed files with 129 additions and 2 deletions

View File

@ -5,14 +5,14 @@ ENV GO111MODULE=auto CGO_ENABLED=0 GOOS=linux
ARG GOPROXY
ARG GONOSUMDB=gitea.libretechconsulting.com
ARG VERSIONPATH=gitea.libretechconsulting.com/rmcguire/go-app/pkg/config.Version
ARG VER_PKG=gitea.libretechconsulting.com/rmcguire/go-app/pkg/config.Version
ARG VERSION=(devel)
COPY ./go.mod ./go.sum ./
RUN go mod download
COPY ./ /app
RUN go build -C . -v -ldflags "-extldflags '-static' -X ${VERSIONPATH}=${VERSION}" -o ambient-local-exporter .
RUN go build -C . -v -ldflags "-extldflags '-static' -X ${VER_PKG}=${VERSION}" -o ambient-local-exporter .
FROM alpine:latest
WORKDIR /app