forked from openshift/assisted-installer-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile.assisted_installer_agent
43 lines (35 loc) · 1.67 KB
/
Dockerfile.assisted_installer_agent
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
42
43
FROM registry.ci.openshift.org/openshift/release:golang-1.18 AS builder
ARG TARGETPLATFORM
ENV GO111MODULE=on
ENV GOFLAGS=""
WORKDIR /go/src/github.com/openshift/assisted-installer-agent
COPY go.mod .
RUN go mod download
COPY . .
RUN TARGETPLATFORM=$TARGETPLATFORM make build
FROM quay.io/centos/centos:stream8
ARG TARGETPLATFORM
RUN if [[ "$TARGETPLATFORM" == "linux/amd64" || -z "$TARGETPLATFORM" ]] ; then dnf install -y biosdevname dmidecode ; fi
RUN if [[ "$TARGETPLATFORM" == "linux/arm64" || -z "$TARGETPLATFORM" ]] ; then dnf install -y dmidecode ; fi
RUN dnf install --setopt=install_weak_deps=False --setopt=tsdocs=False -y \
findutils iputils \
podman \
# inventory
ipmitool file fio \
sg3_utils \
# free_addresses
nmap \
# dhcp_lease_allocate
dhclient \
# logs_sender
tar openssh-clients \
# ntp_synchronizer
chrony \
&& dnf update --setopt=install_weak_deps=False --setopt=tsdocs=False -y systemd && dnf clean all && rm -rf /var/cache
COPY --from=builder /go/src/github.com/openshift/assisted-installer-agent/build/agent /usr/bin/agent
COPY --from=builder /go/src/github.com/openshift/assisted-installer-agent/build/free_addresses /usr/bin/free_addresses
COPY --from=builder /go/src/github.com/openshift/assisted-installer-agent/build/inventory /usr/bin/inventory
COPY --from=builder /go/src/github.com/openshift/assisted-installer-agent/build/logs_sender /usr/bin/logs_sender
COPY --from=builder /go/src/github.com/openshift/assisted-installer-agent/build/next_step_runner /usr/bin/next_step_runner
COPY --from=builder /go/src/github.com/openshift/assisted-installer-agent/build/disk_speed_check /usr/bin/disk_speed_check
COPY scripts/installer/* /usr/local/bin/