-
Notifications
You must be signed in to change notification settings - Fork 65
Expand file tree
/
Copy pathDockerfile.rhel8
More file actions
41 lines (39 loc) · 1.93 KB
/
Dockerfile.rhel8
File metadata and controls
41 lines (39 loc) · 1.93 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.24-openshift-4.22 AS builder
WORKDIR /go/src/github.com/openshift/builder
COPY . .
RUN hack/build.sh
FROM registry.ci.openshift.org/ocp/4.22:base-rhel9
RUN . /etc/os-release && \
CONTAINER_RUNTIME=runc && \
# CentOS/RHEL 10 does not have runc as a package, so replace with crun
# Remove when base image is upgraded to RHEL 10
if [ "${PLATFORM_ID}" = "platform:el10" ]; then \
CONTAINER_RUNTIME=crun; \
fi && \
INSTALL_PKGS=" \
bind-utils bsdtar findutils fuse-overlayfs git git-lfs hostname lsof \
netavark procps-ng ${CONTAINER_RUNTIME} socat tar util-linux wget which \
" && \
yum install -y --setopt=skip_missing_names_on_install=False $INSTALL_PKGS && \
yum clean all
RUN rpm --setcaps shadow-utils
COPY --from=builder /go/src/github.com/openshift/builder/openshift-builder /usr/bin/
COPY imagecontent/bin /usr/bin
COPY imagecontent/etc/containers /etc/containers
COPY imagecontent/usr/share/containers /usr/share/containers
RUN mkdir -p /var/cache/blobs \
/var/lib/shared/overlay-images \
/var/lib/shared/overlay-layers \
/etc/pki/tls/certs /etc/docker/certs.d && \
chmod g+w /etc/pki/tls/certs /etc/docker/certs.d && \
touch /var/lib/shared/overlay-images/images.lock \
/var/lib/shared/overlay-layers/layers.lock
RUN ln -s /usr/bin/openshift-builder /usr/bin/openshift-sti-build && \
ln -s /usr/bin/openshift-builder /usr/bin/openshift-docker-build && \
ln -s /usr/bin/openshift-builder /usr/bin/openshift-git-clone && \
ln -s /usr/bin/openshift-builder /usr/bin/openshift-manage-dockerfile && \
ln -s /usr/bin/openshift-builder /usr/bin/openshift-extract-image-content
LABEL io.k8s.display-name="OpenShift Builder" \
io.k8s.description="This is a component of OpenShift and is responsible for executing image builds." \
io.openshift.tags="openshift,builder"
ENTRYPOINT [ "/usr/bin/entrypoint.sh" ]