File tree 3 files changed +20
-5
lines changed
3 files changed +20
-5
lines changed Original file line number Diff line number Diff line change @@ -9,7 +9,7 @@ runner-bin-fips: export GOOS ?= linux
9
9
runner-bin-fips : export GOARCH ?= amd64
10
10
runner-bin-fips :
11
11
# Building $(NAME) in version $(VERSION) for FIPS $(GOOS) $(GOARCH)
12
- GOOS=$(GOOS ) GOARCH=$(GOARCH ) CGO_ENABLED=1 go build \
12
+ GOOS=$(GOOS ) GOARCH=$(GOARCH ) CGO_ENABLED=1 GOEXPERIMENT=boringcrypto go build \
13
13
-tags fips \
14
14
-ldflags " $( GO_LDFLAGS) " \
15
15
-o=" out/binaries/$( NAME) -$( GOOS) -$( GOARCH) -fips" \
Original file line number Diff line number Diff line change @@ -104,7 +104,7 @@ ${BASE_BINARY_PATH}-fips: export GOOS ?= linux
104
104
${BASE_BINARY_PATH}-fips : export GOARCH ?= amd64
105
105
${BASE_BINARY_PATH}-fips : APP_NAME := "gitlab-runner-helper"
106
106
${BASE_BINARY_PATH}-fips : $(HELPER_GO_FILES )
107
- GOOS=$(GOOS ) GOARCH=$(GOARCH ) CGO_ENABLED=1 go build \
107
+ GOOS=$(GOOS ) GOARCH=$(GOARCH ) CGO_ENABLED=1 GOEXPERIMENT=boringcrypto go build \
108
108
-tags fips \
109
109
-ldflags "$(GO_LDFLAGS)" \
110
110
-o="${BASE_BINARY_PATH}.$(GO_ARCH_NAME_$(GOARCH))-fips" \
Original file line number Diff line number Diff line change @@ -2,22 +2,37 @@ ARG UBI_VERSION
2
2
3
3
FROM redhat/ubi8:${UBI_VERSION}
4
4
5
- RUN INSTALL_PKGS="openssl-devel glibc-devel gcc git golang " && \
5
+ RUN INSTALL_PKGS="openssl-devel glibc-devel gcc git wget " && \
6
6
dnf update -y && \
7
7
dnf install -y --setopt=tsflags=nodocs $INSTALL_PKGS && \
8
8
dnf clean all -y
9
9
10
10
ARG GO_VERSION=1.19
11
+ ARG GO_FULL_VERSION=${GO_VERSION}.6
12
+
13
+ RUN wget https://go.dev/dl/go${GO_FULL_VERSION}.linux-amd64.tar.gz && \
14
+ tar -C /usr/ -xzf go${GO_FULL_VERSION}.linux-amd64.tar.gz
15
+
16
+ ENV PATH="$PATH:/usr/go/bin"
11
17
12
18
RUN git clone \
13
19
https://github.com/golang-fips/go \
14
20
--branch go${GO_VERSION}-fips-release \
15
21
--single-branch \
16
22
--depth 1 \
17
- /usr/local/go
23
+ /tmp/go
24
+
25
+ RUN cd /tmp/go && \
26
+ chmod +x scripts/* && \
27
+ git config --global user.email
"[email protected] " && \
28
+ git config --global user.name "Your Name" && \
29
+ scripts/full-initialize-repo.sh && \
30
+ pushd go/src && \
31
+ CGO_ENABLED=1 ./make.bash && \
32
+ popd && \
33
+ mv go /usr/local/
18
34
19
35
RUN cd /usr/local/go/src && \
20
- CGO_ENABLED=1 ./make.bash && \
21
36
rm -rf \
22
37
/usr/local/go/pkg/*/cmd \
23
38
/usr/local/go/pkg/bootstrap \
You can’t perform that action at this time.
0 commit comments