|
1 |
| -FROM docker.io/library/golang:1.23 as build |
| 1 | +FROM registry.access.redhat.com/ubi9/go-toolset:1.23 as build |
2 | 2 |
|
3 |
| -WORKDIR /utils |
| 3 | +WORKDIR /opt/app-root/src |
4 | 4 | COPY utils/webserver.go .
|
5 | 5 | RUN go mod init webserver.go
|
6 | 6 | RUN GOOS=linux CGO_ENABLED=0 go build -a -o webserver .
|
@@ -44,11 +44,28 @@ RUN dnf install -y \
|
44 | 44 | zlib-devel \
|
45 | 45 | binutils \
|
46 | 46 | vim \
|
| 47 | + hostname \ |
47 | 48 | && dnf clean all
|
48 | 49 |
|
| 50 | +# Install doca-ofed for Mellanox support |
| 51 | +# Check https://trex-tgn.cisco.com/trex/doc/trex_appendix_mellanox.html |
| 52 | +# Installation steps: https://docs.nvidia.com/doca/sdk/doca-host+installation+and+upgrade/index.html |
| 53 | +# (Check "Installing Software on Host" section) |
| 54 | +ENV DOCA_OFED_MAJOR_VERSION 2.10.0 |
| 55 | +ENV DOCA_OFED_RPM doca-host-${DOCA_OFED_MAJOR_VERSION}-093000_25.01_rhel82.x86_64.rpm |
| 56 | +RUN cd /opt && \ |
| 57 | + wget https://www.mellanox.com/downloads/DOCA/DOCA_v${DOCA_OFED_MAJOR_VERSION}/host/${DOCA_OFED_RPM} && \ |
| 58 | + rpm -i ${DOCA_OFED_RPM} && \ |
| 59 | + dnf clean all |
| 60 | + |
| 61 | +RUN dnf install -y \ |
| 62 | + doca-ofed \ |
| 63 | + mlnx-fw-updater |
| 64 | + |
| 65 | +# Install TRex |
49 | 66 | RUN mkdir -p /opt/trex && cd /opt/trex && git clone --branch ${TREX_VER} ${TREX_REPO}
|
50 | 67 | RUN cd /opt/trex/trex-core/linux_dpdk && \
|
51 |
| - ./b configure --no-mlx --no-bxnt --new-memory && \ |
| 68 | + ./b configure --no-bnxt --new-memory && \ |
52 | 69 | ./b build
|
53 | 70 |
|
54 | 71 | RUN cd /opt && git clone ${TRAFFICGEN_REPO} && mv bench-trafficgen/trafficgen . && rm -rf bench-trafficgen
|
@@ -79,7 +96,8 @@ RUN chmod 664 /usr/local/bin/example-cnf/trex_cfg.yaml
|
79 | 96 |
|
80 | 97 | # Copy scripts
|
81 | 98 | COPY --chmod=550 scripts /usr/local/bin
|
82 |
| -COPY --chmod=550 --from=build /utils/webserver /usr/local/bin/webserver |
| 99 | +COPY --chmod=550 --from=build /opt/app-root/src/webserver /usr/local/bin/webserver |
83 | 100 |
|
84 | 101 | # Move to the custom user
|
85 | 102 | USER example-cnf
|
| 103 | + |
0 commit comments