forked from openshift/assisted-installer-agent
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.assisted_installer_agent
47 lines (40 loc) · 2.59 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
44
45
46
47
FROM registry.ci.openshift.org/openshift/release:golang-1.15 AS builder
ENV GO111MODULE=on
ENV GOFLAGS=""
WORKDIR /go/src/github.com/openshift/assisted-installer-agent
COPY go.mod .
RUN go mod download
COPY . .
RUN make build
FROM quay.io/centos/centos:centos8
RUN dnf install -y \
findutils iputils \
podman \
# inventory
dmidecode ipmitool biosdevname file fio \
# Since centos:8 is using an older version of smartmontools (smartctl needed for the inventory command), we download the fedora 32 RPM package and
# install it instead of using the centos repos. (We need version 7.1+ for the `--json=c` flag to work)
# Note that doing this is NOT needed in the downstream Dockerfile, the base image used there is openshift/ose-base:ubi8 and it has the 7.1 version of smartmontools in the repos
https://download-cc-rdu01.fedoraproject.org/pub/fedora/linux/releases/32/Everything/x86_64/os/Packages/s/smartmontools-7.1-8.fc32.x86_64.rpm \
# free_addresses
nmap \
# dhcp_lease_allocate
dhclient \
# logs_sender
tar openssh-clients\
# ntp_synchronizer
chrony && \
dnf update -y systemd && dnf clean all
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/connectivity_check /usr/bin/connectivity_check
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/dhcp_lease_allocate /usr/bin/dhcp_lease_allocate
COPY --from=builder /go/src/github.com/openshift/assisted-installer-agent/build/apivip_check /usr/bin/apivip_check
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/ntp_synchronizer /usr/bin/ntp_synchronizer
COPY --from=builder /go/src/github.com/openshift/assisted-installer-agent/build/container_image_availability /usr/bin/container_image_availability
COPY --from=builder /go/src/github.com/openshift/assisted-installer-agent/build/domain_resolution /usr/bin/domain_resolution
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/