Skip to content

Commit

Permalink
NO-ISSUE: Download rpm packages in a different stage at the build of …
Browse files Browse the repository at this point in the history
…Dockerfile-build as golang image is based on centos 7 which cannot reach its repositories as it is EOL (#242)
  • Loading branch information
danmanor committed Jul 3, 2024
1 parent 9f5422b commit f8c1e51
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 9 deletions.
19 changes: 16 additions & 3 deletions Dockerfile.image-service-build
Original file line number Diff line number Diff line change
@@ -1,6 +1,19 @@
FROM registry.ci.openshift.org/openshift/release:golang-1.21
FROM registry.access.redhat.com/ubi9/go-toolset:1.21 AS golang

ENV GO111MODULE=on
ENV GOFLAGS=""

COPY hack/setup_env.sh ./
RUN ./setup_env.sh
RUN go install github.com/golangci/golangci-lint/cmd/golangci-lint@v1.59.1
RUN go install golang.org/x/tools/cmd/goimports@v0.22.0
RUN go install github.com/golang/mock/mockgen@v1.6.0

FROM quay.io/centos/centos:stream9

RUN dnf install -y podman genisoimage make && dnf clean all

ENV GOROOT=/usr/lib/golang
ENV GOPATH=/opt/app-root/src/go
ENV PATH=$PATH:$GOROOT/bin:$GOPATH/bin

COPY --from=golang $GOPATH $GOPATH
COPY --from=golang $GOROOT $GOROOT
6 changes: 0 additions & 6 deletions hack/setup_env.sh

This file was deleted.

0 comments on commit f8c1e51

Please sign in to comment.