diff --git a/Dockerfile.assisted_installer_agent b/Dockerfile.assisted_installer_agent index 04f0703b3..4e4d79817 100644 --- a/Dockerfile.assisted_installer_agent +++ b/Dockerfile.assisted_installer_agent @@ -12,7 +12,7 @@ COPY . . RUN TARGETPLATFORM=$TARGETPLATFORM make build -FROM quay.io/centos/centos:stream8 +FROM quay.io/centos/centos:stream9 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 @@ -31,6 +31,8 @@ RUN dnf install --setopt=install_weak_deps=False --setopt=tsdocs=False -y \ tar openssh-clients \ # ntp_synchronizer chrony \ + # for the 'nsenter' executable + util-linux-core \ && 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 diff --git a/Dockerfile.assisted_installer_agent-build b/Dockerfile.assisted_installer_agent-build index 44977183d..e90e0a5a8 100644 --- a/Dockerfile.assisted_installer_agent-build +++ b/Dockerfile.assisted_installer_agent-build @@ -12,3 +12,6 @@ RUN go install golang.org/x/tools/cmd/goimports@v0.1.0 && \ go install gotest.tools/gotestsum@v1.6.3 && \ go install github.com/axw/gocov/gocov@latest && \ go install github.com/AlekSi/gocov-xml@latest + +# required due to issue https://github.com/docker/compose/issues/4060 +ENV LANG=en_US.UTF-8 diff --git a/subsystem/Dockerfile.agent_test b/subsystem/Dockerfile.agent_test index f51d96f10..94ff71b07 100644 --- a/subsystem/Dockerfile.agent_test +++ b/subsystem/Dockerfile.agent_test @@ -1,16 +1,16 @@ ARG ASSISTED_INSTALLER_AGENT=quay.io/edge-infrastructure/assisted-installer-agent:latest FROM $ASSISTED_INSTALLER_AGENT -RUN yum install -y yum-utils \ - && yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo \ - && dnf install -y --nobest --allowerasing \ - docker-ce \ - docker-ce-cli \ - containerd.io \ - tcpdump \ - procps \ - python39 \ +RUN dnf install -y 'dnf-command(config-manager)' && \ + dnf config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo && \ + dnf install -y --nobest --allowerasing \ + docker-ce \ + docker-ce-cli \ + containerd.io \ + tcpdump \ + procps \ + python39 \ && dnf clean all RUN echo -e "#!/bin/sh \nshift 7 && \$@" > /usr/bin/nsenter && chmod a+x /usr/bin/nsenter -ADD podman_override /usr/bin/podman \ No newline at end of file +ADD podman_override /usr/bin/podman diff --git a/subsystem/lease_test.go b/subsystem/lease_test.go index de55f5b04..1c18e24b6 100644 --- a/subsystem/lease_test.go +++ b/subsystem/lease_test.go @@ -238,7 +238,7 @@ func startTcpDump(output chan string, ifaceName string, timeoutSecs, count int) if count > 0 { countStr = fmt.Sprintf("-c %d", count) } - dump := fmt.Sprintf("timeout %d tcpdump -l -i %s %s -v 'udp dst port 67' | awk '/DHCP-Message Option 53/{print $6}'", timeoutSecs, ifaceName, countStr) + dump := fmt.Sprintf("timeout %d tcpdump -l -i %s %s -v 'udp dst port 67' | awk '/DHCP-Message \\(53\\)/{print $5}'", timeoutSecs, ifaceName, countStr) s, e, errorCode := agentUtils.Execute("docker", []string{"exec", "agent", "bash", "-c", dump}...) fmt.Println(s, e, errorCode)