Skip to content
Permalink
Browse files
adjust docker file to use Go 1.15
Upgrade Dockerfile to latest maven:x.y.z-jdk-8-slim,
but even then it uses Go no higher than 1.11, so
add some configuration to explicitly install 1.15.
  • Loading branch information
geomacy committed Feb 27, 2021
1 parent 522ebf3 commit 44920581cf986e2848475d666d04ff1aa5e14739
Showing 3 changed files with 17 additions and 7 deletions.
@@ -16,10 +16,23 @@
# under the License.

# For Brooklyn Client, we use a debian distribution instead of alpine as there are some libgcc incompatibilities with GO
FROM maven:3.5.4-jdk-8-slim
FROM maven:3.6.3-jdk-8-slim

# Install necessary binaries to build brooklyn-client
RUN apt-get update && apt-get install -y git-core golang-go
RUN apt-get update && apt-get install -y git-core

# Download Go 1.15 and verify checksum against value from https://golang.org/dl/
# then install to /usr/local
RUN cd /tmp \
&& curl -O https://dl.google.com/go/go1.15.8.linux-amd64.tar.gz \
&& CKSUM=$(sha256sum go1.15.8.linux-amd64.tar.gz | awk '{print $1}') \
&& [ ${CKSUM} = "d3379c32a90fdf9382166f8f48034c459a8cc433730bc9476d39d9082c94583b" ] \
&& tar xf go1.15.8.linux-amd64.tar.gz \
&& rm go1.15.8.linux-amd64.tar.gz \
&& chown -R root:root ./go \
&& mv go /usr/local

ENV PATH="${PATH}:/usr/local/go/bin"

RUN mkdir -p /var/maven/.m2/ && chmod -R 777 /var/maven/
ENV MAVEN_CONFIG=/var/maven/.m2
@@ -29,7 +29,7 @@
<version>1.1.0-SNAPSHOT</version> <!-- BROOKLYN_VERSION -->
<relativePath>../pom.xml</relativePath>
</parent>

<packaging>pom</packaging>

<artifactId>brooklyn-client-cli</artifactId>
@@ -111,7 +111,7 @@
<artifactId>apache-rat-plugin</artifactId>
<configuration>
<excludes combine.children="append">
<exclude>go.sum</exclude>
<exclude>**/go.sum</exclude>
</excludes>
</configuration>
</plugin>
@@ -199,9 +199,6 @@ go test ./... || exit $?
mkdir -p ${outdir}/bin
# Disable use of C code modules (causes problems with cross-compiling)
export CGO_ENABLED=0
# build requested file
function build_cli () {
local filepath=$1

0 comments on commit 4492058

Please sign in to comment.