1
0
mirror of https://github.com/openshift/source-to-image.git synced 2026-02-05 12:44:54 +01:00
Files
source-to-image/Dockerfile
Adam Kaplan 349a4d9039 BUILD-960: Update Containers to UBI9 go-toolset
- Update Dockerfiles to use the ubi9 go-toolset images. For the
  releaser image, this avoids downloading the go sdk as part of the
  relase process.
- Add `build-container` make target for convenience.
- Update ci-operator build root to use rhel-9 golang 1.20 image for OCP
  4.15

Signed-off-by: Adam Kaplan <adam.kaplan@redhat.com>
2024-05-09 13:48:13 -04:00

22 lines
372 B
Docker

FROM registry.redhat.io/ubi9/go-toolset:1.20.12 AS builder
ENV S2I_GIT_VERSION="" \
S2I_GIT_MAJOR="" \
S2I_GIT_MINOR=""
COPY . .
RUN CGO_ENABLED=0 go build -a -ldflags="-s -w" -o /tmp/s2i ./cmd/s2i
#
# Runner Image
#
FROM registry.redhat.io/ubi9/ubi-minimal:9.4
COPY --from=builder /tmp/s2i /usr/local/bin/s2i
USER 1001
ENTRYPOINT [ "/usr/local/bin/s2i" ]