Added args for go toolset image and tag, fixed issue with logger

This commit is contained in:
Luke Powlett
2019-09-23 16:54:51 +01:00
committed by Luke J Powlett
parent ac50d46c78
commit 11890d887b
2 changed files with 5 additions and 3 deletions

View File

@@ -14,10 +14,12 @@
ARG BASE_IMAGE=registry.access.redhat.com/ubi7/ubi-minimal
ARG BASE_TAG=7.7-98
ARG GO_TOOLSET_IMAGE=registry.access.redhat.com/devtools/go-toolset-rhel7
ARG GO_TOOLSET_TAG=1.11.13
###############################################################################
# Build stage to build Go code
###############################################################################
FROM registry.access.redhat.com/devtools/go-toolset-7-rhel7 as builder
FROM $GO_TOOLSET_IMAGE:$GO_TOOLSET_TAG as builder
# FROM docker.io/centos/go-toolset-7-centos7 as builder
# The URL to download the MQ installer from in tar.gz format
# This assumes an archive containing the MQ RPM install packages
@@ -36,7 +38,7 @@ COPY cmd/ ./cmd
COPY internal/ ./internal
COPY pkg/ ./pkg
COPY vendor/ ./vendor
ENV PATH="${PATH}:/opt/rh/go-toolset-7/root/usr/bin" \
ENV PATH="${PATH}:/opt/rh/go-toolset-1.11/root/usr/bin" \
CGO_CFLAGS="-I/opt/mqm/inc/" \
CGO_LDFLAGS_ALLOW="-Wl,-rpath.*"
RUN go build -ldflags "-X \"main.ImageCreated=$(date --iso-8601=seconds)\" -X \"main.ImageRevision=$IMAGE_REVISION\" -X \"main.ImageSource=$IMAGE_SOURCE\" -X \"main.ImageTag=$IMAGE_TAG\"" ./cmd/runmqserver/

View File

@@ -175,7 +175,7 @@ func stopQueueManager(name string) error {
log.Println("Stopping queue manager")
isStandby, err := ready.IsRunningAsStandbyQM(name)
if err != nil {
log.Printf("Error getting status for queue manager %v: ", name, err.Error())
log.Printf("Error getting status for queue manager %v: %v", name, err.Error())
return err
}
args := []string{"-w", "-r", name}