Skip to content

Commit cbc9190

Browse files
committed
fix: fix dockerfile
Signed-off-by: Derek Su <derek.su@suse.com>
1 parent 30b93bd commit cbc9190

1 file changed

Lines changed: 15 additions & 2 deletions

File tree

package/Dockerfile

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,27 @@ RUN if [ "$TARGETPLATFORM" != "linux/amd64" ] && [ "$TARGETPLATFORM" != "linux/a
2323
ENV ARCH ${TARGETPLATFORM#linux/}
2424

2525
RUN zypper -n addrepo --refresh https://download.opensuse.org/repositories/system:/snappy/openSUSE_Factory/system:snappy.repo && \
26-
zypper -n addrepo --refresh https://download.opensuse.org/repositories/network:utilities/16.0/network:utilities.repo && \
2726
zypper --gpg-auto-import-keys ref && \
2827
zypper -n ref && \
2928
zypper update -y
3029

3130
RUN zypper -n install kmod curl wget nfs-client nfs4-acl-tools fuse \
3231
librdmacm1 librdmacm-utils libibverbs perl-Config-General libaio-devel sg3_utils \
33-
iputils telnet iperf qemu-tools iproute2 e2fsprogs e2fsprogs-devel xfsprogs xfsprogs-devel
32+
iputils telnet qemu-tools iproute2 e2fsprogs e2fsprogs-devel xfsprogs xfsprogs-devel
33+
34+
RUN if [ "$ARCH" = "amd64" ]; then \
35+
REPO_URL="https://download.opensuse.org/repositories/network:utilities/openSUSE_Factory/network:utilities.repo"; \
36+
elif [ "$ARCH" = "arm64" ]; then \
37+
REPO_URL="https://download.opensuse.org/repositories/network:utilities/openSUSE_Factory_ARM/network:utilities.repo"; \
38+
else \
39+
echo "Unsupported architecture: $ARCH" && exit 1; \
40+
fi && \
41+
zypper -n addrepo --refresh "$REPO_URL" && \
42+
zypper --gpg-auto-import-keys ref && \
43+
zypper -n ref && \
44+
zypper update -y
45+
46+
RUN zypper -n install iperf
3447

3548
COPY --from=builder /app/bin/backing-image-manager-${ARCH} /usr/local/bin/backing-image-manager
3649
RUN chmod +x /usr/local/bin/backing-image-manager

0 commit comments

Comments
 (0)