-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* Install go "manually" from tarball in ci go-fips container. We need go 1.19 to install go-fips 1.19, and the image only has 1.18. * Specify `GOEXPERIMENT=boringcrypto` when building the fips version of runner. As @stanhu mentions, this is necessary because of https://github.com/golang/go/blob/dev.boringcrypto/README.boringcrypto.md See: * golang/go#51940 * golang-fips/go#59
- Loading branch information
Axel von Bertoldi
committed
Mar 3, 2023
1 parent
12eca5e
commit ba4c482
Showing
3 changed files
with
20 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,22 +2,37 @@ ARG UBI_VERSION | |
|
||
FROM redhat/ubi8:${UBI_VERSION} | ||
|
||
RUN INSTALL_PKGS="openssl-devel glibc-devel gcc git golang" && \ | ||
RUN INSTALL_PKGS="openssl-devel glibc-devel gcc git wget" && \ | ||
dnf update -y && \ | ||
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \ | ||
dnf clean all -y | ||
|
||
ARG GO_VERSION=1.19 | ||
ARG GO_FULL_VERSION=${GO_VERSION}.6 | ||
|
||
RUN wget https://go.dev/dl/go${GO_FULL_VERSION}.linux-amd64.tar.gz && \ | ||
tar -C /usr/ -xzf go${GO_FULL_VERSION}.linux-amd64.tar.gz | ||
|
||
ENV PATH="$PATH:/usr/go/bin" | ||
|
||
RUN git clone \ | ||
https://github.com/golang-fips/go \ | ||
--branch go${GO_VERSION}-fips-release \ | ||
--single-branch \ | ||
--depth 1 \ | ||
/usr/local/go | ||
/tmp/go | ||
|
||
RUN cd /tmp/go && \ | ||
chmod +x scripts/* && \ | ||
git config --global user.email "[email protected]" && \ | ||
git config --global user.name "Your Name" && \ | ||
scripts/full-initialize-repo.sh && \ | ||
pushd go/src && \ | ||
CGO_ENABLED=1 ./make.bash && \ | ||
popd && \ | ||
mv go /usr/local/ | ||
|
||
RUN cd /usr/local/go/src && \ | ||
CGO_ENABLED=1 ./make.bash && \ | ||
rm -rf \ | ||
/usr/local/go/pkg/*/cmd \ | ||
/usr/local/go/pkg/bootstrap \ | ||
|