2023-10-18 08:20:06 -04:00
|
|
|
FROM openshift/origin-release:golang-1.20 AS builder
|
2019-10-29 15:25:09 +01:00
|
|
|
|
|
|
|
|
ENV S2I_GIT_VERSION="" \
|
|
|
|
|
S2I_GIT_MAJOR="" \
|
|
|
|
|
S2I_GIT_MINOR=""
|
|
|
|
|
|
2019-12-20 13:55:52 +05:30
|
|
|
|
|
|
|
|
WORKDIR /tmp/source-to-image
|
|
|
|
|
COPY . .
|
|
|
|
|
|
|
|
|
|
USER root
|
2019-10-29 15:25:09 +01:00
|
|
|
|
2020-06-17 02:54:12 -04:00
|
|
|
RUN make && cp _output/local/bin/linux/$(go env GOARCH)/s2i _output/local/go/bin/s2i
|
2019-10-29 15:25:09 +01:00
|
|
|
|
|
|
|
|
#
|
|
|
|
|
# Runner Image
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
FROM registry.redhat.io/ubi8/ubi
|
|
|
|
|
|
2020-06-17 02:54:12 -04:00
|
|
|
COPY --from=builder /tmp/source-to-image/_output/local/go/bin/s2i /usr/local/bin/s2i
|
2019-12-20 13:55:52 +05:30
|
|
|
|
|
|
|
|
USER 1001
|
2019-10-29 15:25:09 +01:00
|
|
|
|
2019-12-20 13:55:52 +05:30
|
|
|
ENTRYPOINT [ "/usr/local/bin/s2i" ]
|