Skip to content

Commit

Permalink
[release-v1.14] Install tzdata (#944)
Browse files Browse the repository at this point in the history
* Install tzdata in Dockerfiles

* Run generate.sh
  • Loading branch information
creydr authored Nov 7, 2024
1 parent 21b9f93 commit faf2f11
Show file tree
Hide file tree
Showing 29 changed files with 685 additions and 307 deletions.
19 changes: 9 additions & 10 deletions openshift/ci-operator/build-image/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,27 +1,26 @@
# DO NOT EDIT! Generated Dockerfile.

FROM registry.ci.openshift.org/ocp/4.17:cli-artifacts as tools

# Dockerfile to bootstrap build and test in openshift-ci
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder

RUN echo "[kubernetes]" >> /etc/yum.repos.d/kubernetes.repo && \
echo "name=Kubernetes" >> /etc/yum.repos.d/kubernetes.repo && \
echo "baseurl=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/" >> /etc/yum.repos.d/kubernetes.repo && \
echo "enabled=1" >> /etc/yum.repos.d/kubernetes.repo && \
echo "gpgcheck=1" >> /etc/yum.repos.d/kubernetes.repo && \
echo "gpgkey=https://pkgs.k8s.io/core:/stable:/v1.29/rpm/repodata/repomd.xml.key" >> /etc/yum.repos.d/kubernetes.repo
ARG TARGETARCH

COPY --from=tools /usr/share/openshift/linux_$TARGETARCH/oc.rhel8 /usr/bin/oc

RUN yum install -y kubectl httpd-tools
RUN ln -s /usr/bin/oc /usr/bin/kubectl

RUN yum install -y httpd-tools

RUN wget https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3 && \
chmod 700 ./get-helm-3

RUN ./get-helm-3 --version v3.11.3 --no-sudo && helm version

RUN GOFLAGS='' go install github.com/mikefarah/yq/v3@latest
RUN GOFLAGS='' go install -tags="exclude_graphdriver_btrfs containers_image_openpgp" github.com/containers/skopeo/cmd/[email protected]

# go install creates $GOPATH/.cache with root permissions, we delete it here
# to avoid permission issues with the runtime users
RUN rm -rf $GOPATH/.cache

# Allow runtime users to add entries to /etc/passwd
RUN chmod g+rw /etc/passwd
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
# DO NOT EDIT! Generated Dockerfile for cmd/apiserver_receive_adapter.
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

RUN mkdir -p /var/run/ko && \
mkdir -p cmd/apiserver_receive_adapter/kodata && \
go build -o /usr/bin/main ./cmd/apiserver_receive_adapter && \
cp -r cmd/apiserver_receive_adapter/kodata /var/run/ko
ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/apiserver_receive_adapter

FROM registry.access.redhat.com/ubi8/ubi-minimal
FROM $GO_RUNTIME

# install the missing zoneinfo to ubi-minimal
RUN microdnf install tzdata
ARG VERSION=knative-v1.14
RUN microdnf update tzdata -y && microdnf reinstall tzdata -y

COPY --from=builder /usr/bin/main /usr/bin/apiserver_receive_adapter

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
LABEL \
com.redhat.component="openshift-serverless-1-eventing-apiserver-receive-adapter-rhel8-container" \
name="openshift-serverless-1/eventing-apiserver-receive-adapter-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Eventing Apiserver Receive Adapter" \
maintainer="[email protected]" \
description="Red Hat OpenShift Serverless 1 Eventing Apiserver Receive Adapter" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Apiserver Receive Adapter" \
io.k8s.description="Red Hat OpenShift Serverless Eventing Apiserver Receive Adapter" \
io.openshift.tags="apiserver-receive-adapter"

ENTRYPOINT ["/usr/bin/apiserver_receive_adapter"]
36 changes: 25 additions & 11 deletions openshift/ci-operator/knative-images/appender/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
# DO NOT EDIT! Generated Dockerfile for cmd/appender.
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

RUN mkdir -p /var/run/ko && \
mkdir -p cmd/appender/kodata && \
go build -o /usr/bin/main ./cmd/appender && \
cp -r cmd/appender/kodata /var/run/ko
ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/appender

FROM registry.access.redhat.com/ubi8/ubi-minimal
FROM $GO_RUNTIME

# install the missing zoneinfo to ubi-minimal
RUN microdnf install tzdata
ARG VERSION=knative-v1.14
RUN microdnf update tzdata -y && microdnf reinstall tzdata -y

COPY --from=builder /usr/bin/main /usr/bin/appender

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
LABEL \
com.redhat.component="openshift-serverless-1-eventing-appender-rhel8-container" \
name="openshift-serverless-1/eventing-appender-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Eventing Appender" \
maintainer="[email protected]" \
description="Red Hat OpenShift Serverless 1 Eventing Appender" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Appender" \
io.k8s.description="Red Hat OpenShift Serverless Eventing Appender" \
io.openshift.tags="appender"

ENTRYPOINT ["/usr/bin/appender"]
36 changes: 25 additions & 11 deletions openshift/ci-operator/knative-images/channel_controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
# DO NOT EDIT! Generated Dockerfile for cmd/in_memory/channel_controller.
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

RUN mkdir -p /var/run/ko && \
mkdir -p cmd/in_memory/channel_controller/kodata && \
go build -o /usr/bin/main ./cmd/in_memory/channel_controller && \
cp -r cmd/in_memory/channel_controller/kodata /var/run/ko
ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/in_memory/channel_controller

FROM registry.access.redhat.com/ubi8/ubi-minimal
FROM $GO_RUNTIME

# install the missing zoneinfo to ubi-minimal
RUN microdnf install tzdata
ARG VERSION=knative-v1.14
RUN microdnf update tzdata -y && microdnf reinstall tzdata -y

COPY --from=builder /usr/bin/main /usr/bin/channel_controller

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
LABEL \
com.redhat.component="openshift-serverless-1-eventing-in-memory-channel-controller-rhel8-container" \
name="openshift-serverless-1/eventing-in-memory-channel-controller-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Eventing In Memory Channel Controller" \
maintainer="[email protected]" \
description="Red Hat OpenShift Serverless 1 Eventing In Memory Channel Controller" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing In Memory Channel Controller" \
io.k8s.description="Red Hat OpenShift Serverless Eventing In Memory Channel Controller" \
io.openshift.tags="in-memory-channel-controller"

ENTRYPOINT ["/usr/bin/channel_controller"]
36 changes: 25 additions & 11 deletions openshift/ci-operator/knative-images/channel_dispatcher/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
# DO NOT EDIT! Generated Dockerfile for cmd/in_memory/channel_dispatcher.
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

RUN mkdir -p /var/run/ko && \
mkdir -p cmd/in_memory/channel_dispatcher/kodata && \
go build -o /usr/bin/main ./cmd/in_memory/channel_dispatcher && \
cp -r cmd/in_memory/channel_dispatcher/kodata /var/run/ko
ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/in_memory/channel_dispatcher

FROM registry.access.redhat.com/ubi8/ubi-minimal
FROM $GO_RUNTIME

# install the missing zoneinfo to ubi-minimal
RUN microdnf install tzdata
ARG VERSION=knative-v1.14
RUN microdnf update tzdata -y && microdnf reinstall tzdata -y

COPY --from=builder /usr/bin/main /usr/bin/channel_dispatcher

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
LABEL \
com.redhat.component="openshift-serverless-1-eventing-in-memory-channel-dispatcher-rhel8-container" \
name="openshift-serverless-1/eventing-in-memory-channel-dispatcher-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Eventing In Memory Channel Dispatcher" \
maintainer="[email protected]" \
description="Red Hat OpenShift Serverless 1 Eventing In Memory Channel Dispatcher" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing In Memory Channel Dispatcher" \
io.k8s.description="Red Hat OpenShift Serverless Eventing In Memory Channel Dispatcher" \
io.openshift.tags="in-memory-channel-dispatcher"

ENTRYPOINT ["/usr/bin/channel_dispatcher"]
36 changes: 25 additions & 11 deletions openshift/ci-operator/knative-images/controller/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
# DO NOT EDIT! Generated Dockerfile for cmd/controller.
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

RUN mkdir -p /var/run/ko && \
mkdir -p cmd/controller/kodata && \
go build -o /usr/bin/main ./cmd/controller && \
cp -r cmd/controller/kodata /var/run/ko
ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/controller

FROM registry.access.redhat.com/ubi8/ubi-minimal
FROM $GO_RUNTIME

# install the missing zoneinfo to ubi-minimal
RUN microdnf install tzdata
ARG VERSION=knative-v1.14
RUN microdnf update tzdata -y && microdnf reinstall tzdata -y

COPY --from=builder /usr/bin/main /usr/bin/controller

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
LABEL \
com.redhat.component="openshift-serverless-1-eventing-controller-rhel8-container" \
name="openshift-serverless-1/eventing-controller-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Eventing Controller" \
maintainer="[email protected]" \
description="Red Hat OpenShift Serverless 1 Eventing Controller" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Controller" \
io.k8s.description="Red Hat OpenShift Serverless Eventing Controller" \
io.openshift.tags="controller"

ENTRYPOINT ["/usr/bin/controller"]
36 changes: 25 additions & 11 deletions openshift/ci-operator/knative-images/event_display/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
# DO NOT EDIT! Generated Dockerfile for cmd/event_display.
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

RUN mkdir -p /var/run/ko && \
mkdir -p cmd/event_display/kodata && \
go build -o /usr/bin/main ./cmd/event_display && \
cp -r cmd/event_display/kodata /var/run/ko
ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/event_display

FROM registry.access.redhat.com/ubi8/ubi-minimal
FROM $GO_RUNTIME

# install the missing zoneinfo to ubi-minimal
RUN microdnf install tzdata
ARG VERSION=knative-v1.14
RUN microdnf update tzdata -y && microdnf reinstall tzdata -y

COPY --from=builder /usr/bin/main /usr/bin/event_display

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
LABEL \
com.redhat.component="openshift-serverless-1-eventing-event-display-rhel8-container" \
name="openshift-serverless-1/eventing-event-display-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Eventing Event Display" \
maintainer="[email protected]" \
description="Red Hat OpenShift Serverless 1 Eventing Event Display" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Event Display" \
io.k8s.description="Red Hat OpenShift Serverless Eventing Event Display" \
io.openshift.tags="event-display"

ENTRYPOINT ["/usr/bin/event_display"]
36 changes: 25 additions & 11 deletions openshift/ci-operator/knative-images/filter/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,20 +1,34 @@
# DO NOT EDIT! Generated Dockerfile for cmd/broker/filter.
FROM registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17 as builder
ARG GO_BUILDER=registry.ci.openshift.org/openshift/release:rhel-8-release-golang-1.22-openshift-4.17
ARG GO_RUNTIME=registry.access.redhat.com/ubi8/ubi-minimal

FROM $GO_BUILDER as builder

COPY . .

RUN mkdir -p /var/run/ko && \
mkdir -p cmd/broker/filter/kodata && \
go build -o /usr/bin/main ./cmd/broker/filter && \
cp -r cmd/broker/filter/kodata /var/run/ko
ENV CGO_ENABLED=1
ENV GOEXPERIMENT=strictfipsruntime

RUN go build -tags strictfipsruntime -o /usr/bin/main ./cmd/broker/filter

FROM registry.access.redhat.com/ubi8/ubi-minimal
FROM $GO_RUNTIME

# install the missing zoneinfo to ubi-minimal
RUN microdnf install tzdata
ARG VERSION=knative-v1.14
RUN microdnf update tzdata -y && microdnf reinstall tzdata -y

COPY --from=builder /usr/bin/main /usr/bin/filter

USER 65532

COPY --from=builder /usr/bin/main /usr/bin/main
COPY --from=builder /var/run/ko /var/run/ko
ENTRYPOINT ["/usr/bin/main"]
LABEL \
com.redhat.component="openshift-serverless-1-eventing-broker-filter-rhel8-container" \
name="openshift-serverless-1/eventing-broker-filter-rhel8" \
version=$VERSION \
summary="Red Hat OpenShift Serverless 1 Eventing Broker Filter" \
maintainer="[email protected]" \
description="Red Hat OpenShift Serverless 1 Eventing Broker Filter" \
io.k8s.display-name="Red Hat OpenShift Serverless 1 Eventing Broker Filter" \
io.k8s.description="Red Hat OpenShift Serverless Eventing Broker Filter" \
io.openshift.tags="broker-filter"

ENTRYPOINT ["/usr/bin/filter"]
Loading

0 comments on commit faf2f11

Please sign in to comment.