1
0
mirror of https://github.com/openshift/source-to-image.git synced 2026-02-05 03:45:02 +01:00
Files
source-to-image/Dockerfile
Sayan Biswas f68cc16834 Use UBI8 based base image and builder image
Changes:
- Use UIB8 based base imgae
- Use go-toolset from UBI8

Currently comet repo exists for rhel-8 based images, so to onboard to konflux easily we'll go ahead with rehl-8 image now. When comet repo for rhel-9 is configured, we'll switch to rehl-9 based images.
2024-09-28 20:35:56 +05:30

22 lines
370 B
Docker

FROM registry.redhat.io/ubi8/go-toolset:1.21 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/ubi8/ubi-minimal:8.10
COPY --from=builder /tmp/s2i /usr/local/bin/s2i
USER 1001
ENTRYPOINT [ "/usr/local/bin/s2i" ]