|
1 |
| -FROM registry.ci.openshift.org/openshift/release:golang-1.17 |
2 |
| -ENV GO111MODULE=on |
3 |
| -ENV GOFLAGS="" |
| 1 | +FROM registry.ci.openshift.org/openshift/release:golang-1.20 AS golang |
| 2 | +RUN chmod g+xw -R /usr/local/go |
4 | 3 |
|
5 |
| -COPY --from=quay.io/goswagger/swagger:v0.28.0 /usr/bin/swagger /usr/bin/goswagger |
6 |
| -COPY --from=quay.io/edge-infrastructure/swagger-codegen-cli:2.4.18 /opt/swagger-codegen-cli /opt/swagger-codegen-cli |
| 4 | +FROM quay.io/centos/centos:stream9 |
7 | 5 |
|
8 |
| -USER 0 |
| 6 | +ENV GOPATH=/go |
| 7 | +ENV GOROOT=/usr/local/go |
| 8 | +ENV VIRTUAL_ENV=/opt/venv |
| 9 | +# A directory in the path with write permission even for non-root users |
| 10 | +ENV TOOLS=/tools/ |
| 11 | +ENV PATH="$VIRTUAL_ENV/bin:$GOROOT/bin:$GOPATH/bin:$TOOLS:$PATH" |
9 | 12 |
|
10 |
| -RUN curl -L https://github.com/stoplightio/spectral/releases/download/v5.9.1/spectral-linux -o /usr/local/bin/spectral && chmod +x /usr/local/bin/spectral |
| 13 | +RUN curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b /usr/bin v1.53.2 |
| 14 | +COPY --from=quay.io/goswagger/swagger:sha-5d0a00d /usr/bin/swagger /usr/bin/goswagger |
11 | 15 |
|
12 |
| -RUN yum install -y --setopt=skip_missing_names_on_install=False docker podman |
13 |
| -RUN mkdir build && chmod g+xw -R build/ |
| 16 | +COPY --from=quay.io/edge-infrastructure/swagger-codegen-cli:2.4.18 /opt/swagger-codegen-cli /opt/swagger-codegen-cli |
| 17 | +COPY --from=golang /usr/bin/gotestsum /usr/bin/make /usr/bin/ |
| 18 | +COPY --from=golang /usr/local/go /usr/local/go |
| 19 | +COPY --from=quay.io/openshift/origin-cli:latest /usr/bin/oc /usr/bin |
| 20 | +COPY --from=quay.io/operator-framework/upstream-opm-builder:v1.16.1 /bin/opm /bin |
| 21 | +COPY --from=registry.k8s.io/kustomize/kustomize:v4.3.0 /app/kustomize /usr/bin/ |
| 22 | +COPY --from=quay.io/coreos/shellcheck-alpine:v0.5.0 /bin/shellcheck /usr/bin/shellcheck |
14 | 23 |
|
15 |
| -RUN chmod g+xw -R . |
| 24 | +COPY ./hack/setup_env.sh ./ |
| 25 | +RUN ./setup_env.sh podman_remote && \ |
| 26 | + dnf clean all |
0 commit comments