ploigos / ploigos-containers

Container image definitions for the Ploigos project.
GNU General Public License v3.0
7 stars 14 forks source link

Fix ploigos-tool-autogov build (Download GoLang and install) #125

Closed jimmyliang-gov closed 2 weeks ago

jimmyliang-gov commented 2 weeks ago

Purpose

PR to fix the ploigos-tool-autogov image. The old image attempts to fetch and install golang via deprecated CentOS repo. The new approach is to download golang and install.

Breaking?

No

Integration Testing

Here is a successful build (with some debug RUN statements to get the go version):

STEP 10/20: RUN curl -L https://go.dev/dl/go${GOLANG_VERSION}.linux-amd64.tar.gz -o /tmp/golang.tar.gz && tar -C /usr/local -xzf /tmp/golang.tar.gz
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
% Total % Received % Xferd Average Speed Time Time Time Current
Dload Upload Total Spent Left Speed
0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0100 75 100 75 0 0 619 0 --:--:-- --:--:-- --:--:-- 619
83 65.7M 83 55.0M 0 0 123M 0 --:--:-- --:--:-- --:--:-- 123M100 65.7M 100 65.7M 0 0 132M 0 --:--:-- --:--:-- --:--:-- 209M
--> a5b72fa59a8
STEP 11/20: ENV PATH=$PATH:/usr/local/go/bin
--> 31eeb158087
STEP 12/20: ENV GOPATH=$HOME/go
--> a0cdab86bc4
STEP 13/20: ENV PATH=$PATH:$GOPATH/bin
--> 42a88dc6833
STEP 14/20: RUN which go
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
/usr/local/go/bin/go
--> 98c20fc69f9
STEP 15/20: RUN go version
/bin/sh: warning: setlocale: LC_ALL: cannot change locale (en_US.UTF-8)
go version go1.22.4 linux/amd64

Additionally, the autogov image locally was able to use go to build rekor successfully.

itewk commented 2 weeks ago

@jimmyliang-gov due to the way CI secrets work in github, the branch has to be on the main project and not from a fork for the CI to work. i have added you as a comitter on this project so you can push your branch to this project and re-open the PR to get the CI to start running. please close out this one and open new one from bracnh right on the project. sorry for the pain.