-
Notifications
You must be signed in to change notification settings - Fork 24
Expand file tree
/
Copy pathDockerfile
More file actions
18 lines (15 loc) · 1.03 KB
/
Dockerfile
File metadata and controls
18 lines (15 loc) · 1.03 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
FROM registry.ci.openshift.org/ocp/builder:rhel-9-golang-1.25-openshift-4.22 AS builder
WORKDIR /go/src/github.com/openshift/image-customization-controller
COPY . .
RUN CGO_ENABLED=0 GO111MODULE=on go build -mod=vendor -a -o bin/image-customization-controller cmd/controller/main.go
RUN CGO_ENABLED=0 GO111MODULE=on go build -mod=vendor -a -o bin/image-customization-server cmd/static-server/main.go
FROM registry.ci.openshift.org/ocp/4.22:base-rhel9
COPY --from=builder /go/src/github.com/openshift/image-customization-controller/bin/image-customization-controller /
COPY --from=builder /go/src/github.com/openshift/image-customization-controller/bin/image-customization-server /
# Binaries should be renamed to machine-image-customization-*, but to ensure
# backwards compatibility just create symlinks for now.
RUN ln -s /image-customization-controller /machine-image-customization-controller
RUN ln -s /image-customization-server /machine-image-customization-server
RUN dnf install -y nmstate && \
dnf clean all && \
rm -rf /var/cache/dnf/*