fix opm-related build

This commit is contained in:
Dmitry Makovey 2021-10-14 10:00:20 -06:00
parent 5547149e5d
commit 7f8ce99ece

View file

@ -14,17 +14,19 @@ RUN mkdir /src && cd /src; \
## Opm
FROM golang:${GOLANG_VERSION}-alpine as opm
ARG OPM_VERSION=1.19.0
ENV GOPROXY="https://proxy.golang.org/"
RUN apk add --no-cache gcc musl-dev
## on Alpine needs to be built from scratch due to glibc vs musl issues
RUN apk add --no-cache make gcc musl-dev curl
## on Alpine opm needs to be built from scratch due to glibc vs musl issues
RUN mkdir -p /src \
&& curl -s -L -o /src/operator-registry-${OPM_VERSION}.tgz https://github.com/operator-framework/operator-registry/archive/refs/tags/v${OPM_VERSION}.tar.gz \
&& cd /src \
&& tar -xzf operator-registry-${OPM_VERSION}.tgz \
&& ln -s operator-registry operator-registry-${OPM_VERSION} \
&& cd operator-registry-${OPM_VERSION} \
&& ln -s operator-registry-${OPM_VERSION} operator-registry \
&& cd operator-registry \
&& make bin/opm
## Controller-gen