diff --git a/Dockerfile b/Dockerfile index 2c782ed593..d9692df9eb 100644 --- a/Dockerfile +++ b/Dockerfile @@ -12,6 +12,10 @@ COPY ./build.sh /root/containerbuild/ RUN ./build.sh configure_yum_repos RUN ./build.sh install_rpms # nocache 03/10/22 +# install golang +ENV PATH="/usr/local/go/bin:${PATH}" +RUN ./build.sh install_golang + # This allows Prow jobs for other projects to use our cosa image as their # buildroot image (so clonerefs can copy the repo into `/go`). For cosa itself, # this same hack is inlined in the YAML (see openshift/release link above). diff --git a/build.sh b/build.sh index 10f1584e92..5a135b1200 100755 --- a/build.sh +++ b/build.sh @@ -18,6 +18,7 @@ if [ $# -gt 1 ]; then echo " configure_user" echo " configure_yum_repos" echo " install_rpms" + echo " install_golang" echo " make_and_makeinstall" exit 1 fi @@ -34,6 +35,12 @@ configure_yum_repos() { echo -e "[f${version_id}-coreos-continuous]\nenabled=1\nmetadata_expire=1m\nbaseurl=https://kojipkgs.fedoraproject.org/repos-dist/f${version_id}-coreos-continuous/latest/\$basearch/\ngpgcheck=0\nskip_if_unavailable=False\n" > /etc/yum.repos.d/coreos.repo } +install_golang() { + curl -L -O https://go.dev/dl/go1.17.8.linux-amd64.tar.gz + rm -rf /usr/local/go && tar -C /usr/local -xzf go1.17.8.linux-amd64.tar.gz + go version +} + install_rpms() { local builddeps local frozendeps @@ -125,6 +132,7 @@ else # Otherwise, just run all the steps configure_yum_repos install_rpms + install_golang write_archive_info make_and_makeinstall configure_user diff --git a/src/build-deps.txt b/src/build-deps.txt index 644666b529..5ee31a16a0 100644 --- a/src/build-deps.txt +++ b/src/build-deps.txt @@ -1,2 +1,2 @@ # Used by mantle -golang +gcc