Using golang:1.13.9-alpine as base container for the gocover-cobertura tool (it requires Golang to be installed)
Change-Id: Ie09642e350c579b4f759da4adad0ce766ec3673d
diff --git a/Makefile b/Makefile
index db3ca93..87a15f8 100644
--- a/Makefile
+++ b/Makefile
@@ -79,6 +79,7 @@
gocover-cobertura:
${DOCKER} build ${DOCKER_BUILD_ARGS} \
+ --build-arg GOLANG_VERSION=${GOLANG_VERSION} \
--build-arg GOCOVER_COBERTURA_VERSION=${GOCOVER_COBERTURA_VERSION} \
-t ${IMAGENAME}:${VERSION}-gocover-cobertura \
-t ${IMAGENAME}:latest-gocover-cobertura \
@@ -133,4 +134,3 @@
${DOCKER} push ${IMAGENAME}:${VERSION}-hadolint
${DOCKER} push ${IMAGENAME}:${VERSION}-protoc
${DOCKER} push ${IMAGENAME}:${VERSION}-python
-
diff --git a/VERSION b/VERSION
index 276cbf9..2bf1c1c 100644
--- a/VERSION
+++ b/VERSION
@@ -1 +1 @@
-2.3.0
+2.3.1
diff --git a/docker/gocover-cobertura.Dockerfile b/docker/gocover-cobertura.Dockerfile
index f0ced49..21d59fd 100644
--- a/docker/gocover-cobertura.Dockerfile
+++ b/docker/gocover-cobertura.Dockerfile
@@ -11,8 +11,8 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
-FROM golang:1.13.9-alpine as build
+ARG GOLANG_VERSION
+FROM golang:$GOLANG_VERSION-alpine as build
RUN apk add --no-cache build-base=0.5-r1
@@ -20,13 +20,17 @@
ARG GOCOVER_COBERTURA_VERSION
RUN GO111MODULE=on CGO_ENABLED=0 go get -u -ldflags "-linkmode external -extldflags -static" github.com/t-yuki/gocover-cobertura@$GOCOVER_COBERTURA_VERSION
-FROM busybox:1.31.1
+FROM golang:$GOLANG_VERSION-alpine
# copy gocover-cobertura
COPY --from=build /go/bin/* /usr/local/bin/
WORKDIR /app
+ENV GOPATH=/app
+
+RUN mkdir -m 777 /.cache /go/pkg
+
# Label image
ARG org_label_schema_version=unknown
ARG org_label_schema_vcs_url=unknown