Skip to content

Commit 4357e3d

Browse files
jvallesmpinglin
authored andcommitted
fix(Dockerfile): correct serviceVersion injection (#1036)
This commit - Updates the service version build flag in the Dockerfile. the variable name had been updated but not the build flag.
1 parent 342e1ec commit 4357e3d

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

Dockerfile

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,29 +45,29 @@ RUN --mount=type=bind,target=. \
4545
--mount=type=cache,target=/go/pkg/mod \
4646
--mount=type=cache,target=/root/.cache/go-build \
4747
GOOS=$TARGETOS GOARCH=$TARGETARCH \
48-
go build -ldflags "-w -X main.version=${SERVICE_VERSION} -X main.serviceName=${SERVICE_NAME}" \
48+
go build -ldflags "-w -X main.serviceVersion=${SERVICE_VERSION} -X main.serviceName=${SERVICE_NAME}" \
4949
-tags=ocr,onnx -o /${SERVICE_NAME} ./cmd/main
5050

5151
RUN --mount=type=bind,target=. \
5252
--mount=type=cache,target=/go/pkg/mod \
5353
--mount=type=cache,target=/root/.cache/go-build \
5454
GOOS=$TARGETOS GOARCH=$TARGETARCH \
5555
go mod download && \
56-
go build -ldflags "-w -X main.version=${SERVICE_VERSION} -X main.serviceName=${SERVICE_NAME}-worker" \
56+
go build -ldflags "-w -X main.serviceVersion=${SERVICE_VERSION} -X main.serviceName=${SERVICE_NAME}-worker" \
5757
-tags=ocr,onnx -o /${SERVICE_NAME}-worker ./cmd/worker
5858

5959
RUN --mount=type=bind,target=. \
6060
--mount=type=cache,target=/go/pkg/mod \
6161
--mount=type=cache,target=/root/.cache/go-build \
6262
GOOS=$TARGETOS GOARCH=$TARGETARCH \
63-
go build -ldflags "-w -X main.version=${SERVICE_VERSION} -X main.serviceName=${SERVICE_NAME}-migrate" \
63+
go build -ldflags "-w -X main.serviceVersion=${SERVICE_VERSION} -X main.serviceName=${SERVICE_NAME}-migrate" \
6464
-tags=ocr,onnx -o /${SERVICE_NAME}-migrate ./cmd/migration
6565

6666
RUN --mount=type=bind,target=. \
6767
--mount=type=cache,target=/go/pkg/mod \
6868
--mount=type=cache,target=/root/.cache/go-build \
6969
GOOS=$TARGETOS GOARCH=$TARGETARCH \
70-
go build -ldflags "-w -X main.version=${SERVICE_VERSION} -X main.serviceName=${SERVICE_NAME}-init" \
70+
go build -ldflags "-w -X main.serviceVersion=${SERVICE_VERSION} -X main.serviceName=${SERVICE_NAME}-init" \
7171
-tags=ocr,onnx -o /${SERVICE_NAME}-init ./cmd/init
7272

7373
FROM debian:bullseye-slim

0 commit comments

Comments
 (0)