fix(6315): Ensure docker build is backward-compatible
* Older docker versions do not support the -f . syntax. Workaround by
creating a temp file then removing
@@ -120,7 +120,7 @@ build_operator()
OPTS="$OPTS '$i'"
done
- docker build -t "${BUILDER_IMAGE_NAME}" . -f - <<EODockerfile
+ cat > "${BUILDER_IMAGE_NAME}.tmp" <<EODockerfile
FROM golang:1.12.0
WORKDIR /go/src/${OPERATOR_GO_PACKAGE}
ENV GO111MODULE=on
@@ -138,6 +138,9 @@ RUN GOOS=darwin GOARCH=amd64 go build $OPTS -o /dist/darwin-amd64/operator -g
RUN GOOS=windows GOARCH=amd64 go build $OPTS -o /dist/windows-amd64/operator -gcflags all=-trimpath=\${GOPATH} -asmflags all=-trimpath=\${GOPATH} -mod=vendor github.com/syndesisio/syndesis/install/operator/cmd/manager
EODockerfile
+ docker build -t "${BUILDER_IMAGE_NAME}" . -f "${BUILDER_IMAGE_NAME}.tmp"
+ rm -f "${BUILDER_IMAGE_NAME}.tmp"
+
echo ======================================================
for GOARCH in amd64 ; do
