Skip to content

Commit

Permalink
Ported network utilities
Browse files Browse the repository at this point in the history
  • Loading branch information
Ty3r0X committed Nov 23, 2024
1 parent 64b4552 commit 2d25654
Show file tree
Hide file tree
Showing 17 changed files with 1,244 additions and 0 deletions.
33 changes: 33 additions & 0 deletions library/network-tools/dig/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
FROM alpine:latest AS build

RUN apk add --no-cache \
bind-tools

FROM scratch

COPY --from=build /usr/bin/dig /usr/bin/dig

COPY --from=build /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1
COPY --from=build /usr/lib/libisc-9.18.27.so /usr/lib/libisc-9.18.27.so
COPY --from=build /usr/lib/libdns-9.18.27.so /usr/lib/libdns-9.18.27.so
COPY --from=build /usr/lib/libisccfg-9.18.27.so /usr/lib/libisccfg-9.18.27.so
COPY --from=build /usr/lib/libirs-9.18.27.so /usr/lib/libirs-9.18.27.so
COPY --from=build /usr/lib/libbind9-9.18.27.so /usr/lib/libbind9-9.18.27.so
COPY --from=build /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1
COPY --from=build /usr/lib/libuv.so.1 /usr/lib/libuv.so.1
COPY --from=build /lib/libssl.so.3 /lib/libssl.so.3
COPY --from=build /lib/libcrypto.so.3 /lib/libcrypto.so.3
COPY --from=build /lib/libz.so.1 /lib/libz.so.1
COPY --from=build /usr/lib/libjson-c.so.5 /usr/lib/libjson-c.so.5
COPY --from=build /usr/lib/libnghttp2.so.14 /usr/lib/libnghttp2.so.14
COPY --from=build /usr/lib/libxml2.so.2 /usr/lib/libxml2.so.2
COPY --from=build /usr/lib/libgssapi_krb5.so.2 /usr/lib/libgssapi_krb5.so.2
COPY --from=build /usr/lib/libkrb5.so.3 /usr/lib/libkrb5.so.3
COPY --from=build /usr/lib/libfstrm.so.0 /usr/lib/libfstrm.so.0
COPY --from=build /usr/lib/libprotobuf-c.so.1 /usr/lib/libprotobuf-c.so.1
COPY --from=build /usr/lib/libns-9.18.27.so /usr/lib/libns-9.18.27.so
COPY --from=build /usr/lib/liblzma.so.5 /usr/lib/liblzma.so.5
COPY --from=build /usr/lib/libk5crypto.so.3 /usr/lib/libk5crypto.so.3
COPY --from=build /lib/libcom_err.so.2 /lib/libcom_err.so.2
COPY --from=build /usr/lib/libkrb5support.so.0 /usr/lib/libkrb5support.so.0
COPY --from=build /usr/lib/libkeyutils.so.1 /usr/lib/libkeyutils.so.1
146 changes: 146 additions & 0 deletions library/network-tools/dig/Kraftfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
spec: v0.6

name: dig

rootfs: ./Dockerfile

cmd: ["/usr/bin/dig"]

template:
source: https://github.com/unikraft/app-elfloader.git
version: staging

unikraft:
# source: https://github.com/unikraft/unikraft.git
# version: staging
source: /home/ty3r0x/Projects/unikraft/unikraft/
kconfig:
# Configurations options for app-elfloader
# (they can't be part of the template atm)
CONFIG_APPELFLOADER_ARCH_PRCTL: 'y'
CONFIG_APPELFLOADER_BRK: 'y'
CONFIG_APPELFLOADER_CUSTOMAPPNAME: 'y'
CONFIG_APPELFLOADER_STACK_NBPAGES: 128
CONFIG_APPELFLOADER_VFSEXEC_EXECBIT: 'n'
CONFIG_APPELFLOADER_VFSEXEC: 'y'
CONFIG_APPELFLOADER_HFS: 'y'
CONFIG_APPELFLOADER_HFS_ETCRESOLVCONF: 'y'
CONFIG_APPELFLOADER_HFS_ETCHOSTS: 'y'
CONFIG_APPELFLOADER_HFS_ETCHOSTNAME: 'y'
CONFIG_APPELFLOADER_HFS_REPLACEEXIST: 'y'
# Unikraft options
CONFIG_HAVE_PAGING_DIRECTMAP: 'y'
CONFIG_HAVE_PAGING: 'y'
CONFIG_I8042: 'y'
CONFIG_LIBDEVFS_AUTOMOUNT: 'y'
CONFIG_LIBDEVFS_DEV_NULL: 'y'
CONFIG_LIBDEVFS_DEV_STDOUT: 'y'
CONFIG_LIBDEVFS_DEV_ZERO: 'y'
CONFIG_LIBDEVFS: 'y'
CONFIG_LIBPOSIX_ENVIRON_ENVP0: "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
CONFIG_LIBPOSIX_ENVIRON_ENVP1: "LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib"
CONFIG_LIBPOSIX_ENVIRON_ENVP2: "HOME=/"
CONFIG_LIBPOSIX_ENVIRON: 'y'
CONFIG_LIBPOSIX_ENVIRON_LIBPARAM: 'y'
CONFIG_LIBPOSIX_ENVIRON_LIBPARAM_MAXCOUNT: '64'
CONFIG_LIBPOSIX_EVENTFD: 'y'
CONFIG_LIBPOSIX_FDIO: 'y'
CONFIG_LIBPOSIX_FDTAB: 'y'
CONFIG_LIBPOSIX_FUTEX: 'y'
CONFIG_LIBPOSIX_MMAP: 'y'
CONFIG_LIBPOSIX_NETLINK: 'y'
CONFIG_LIBPOSIX_PIPE: 'y'
CONFIG_LIBPOSIX_POLL: 'y'
CONFIG_LIBPOSIX_PROCESS_CLONE: 'y'
CONFIG_LIBPOSIX_SOCKET: 'y'
CONFIG_LIBPOSIX_SYSINFO: 'y'
CONFIG_LIBPOSIX_TIME: 'y'
CONFIG_LIBPOSIX_TIMERFD: 'y'
CONFIG_LIBPOSIX_UNIXSOCKET: 'y'
CONFIG_LIBPOSIX_USER_GID: 0
CONFIG_LIBPOSIX_USER_GROUPNAME: "root"
CONFIG_LIBPOSIX_USER_UID: 0
CONFIG_LIBPOSIX_USER_USERNAME: "root"
CONFIG_LIBPOSIX_USER: 'y'
CONFIG_LIBRAMFS: 'y'
CONFIG_LIBSYSCALL_SHIM_HANDLER_ULTLS: 'y'
CONFIG_LIBSYSCALL_SHIM_HANDLER: 'y'
CONFIG_LIBSYSCALL_SHIM_LEGACY_VERBOSE: 'y'
CONFIG_LIBSYSCALL_SHIM: 'y'
CONFIG_LIBUKRANDOM_GETRANDOM: 'y'
CONFIG_LIBUKALLOCPOOL: 'y'
CONFIG_LIBUKBLKDEV_MAXNBQUEUES: '1'
CONFIG_LIBUKBLKDEV_DISPATCHERTHREADS: 'y'
CONFIG_LIBUKBLKDEV_SYNC_IO_BLOCKED_WAITING: 'y'
CONFIG_LIBUKBLKDEV: 'y'
CONFIG_LIBUKBOOT_BANNER_MINIMAL: 'y'
CONFIG_LIBUKBOOT_HEAP_BASE: '0x400000000'
CONFIG_LIBUKBOOT_MAINTHREAD: 'y'
CONFIG_LIBUKBOOT_SHUTDOWNREQ_HANDLER: 'y'
CONFIG_LIBUKCPIO: 'y'
CONFIG_LIBUKDEBUG_CRASH_SCREEN: 'y'
CONFIG_LIBUKDEBUG_ENABLE_ASSERT: 'y'
CONFIG_LIBUKDEBUG_PRINT_SRCNAME: 'n'
CONFIG_LIBUKDEBUG_PRINT_TIME: 'y'
CONFIG_LIBUKDEBUG_PRINTK_ERR: 'y'
CONFIG_LIBUKDEBUG_PRINTK: 'y'
CONFIG_LIBUKDEBUG: 'y'
CONFIG_LIBUKFALLOC: 'y'
CONFIG_LIBUKMPI: 'n'
CONFIG_LIBUKSIGNAL: 'y'
CONFIG_LIBUKRANDOM_DEVFS: 'y'
CONFIG_LIBUKRANDOM: 'y'
CONFIG_LIBUKVMEM_DEFAULT_BASE: '0x0000001000000000'
CONFIG_LIBUKVMEM_DEMAND_PAGE_IN_SIZE: 12
CONFIG_LIBUKVMEM_PAGEFAULT_HANDLER_PRIO: 4
CONFIG_LIBUKVMEM: 'y'
CONFIG_LIBVFSCORE_AUTOMOUNT_CI: 'y'
CONFIG_LIBVFSCORE_AUTOMOUNT_CI_EINITRD: 'y'
CONFIG_LIBVFSCORE_AUTOMOUNT_UP: 'y'
CONFIG_LIBVFSCORE_AUTOMOUNT: 'y'
CONFIG_LIBVFSCORE_NONLARGEFILE: 'y'
CONFIG_LIBVFSCORE: 'y'
CONFIG_LIBUK9P: 'y'
CONFIG_OPTIMIZE_DEADELIM: 'y'
CONFIG_OPTIMIZE_LTO: 'y'
CONFIG_PAGING: 'y'
CONFIG_STACK_SIZE_PAGE_ORDER: 4 # 128 * 4K = 512K
CONFIG_UKPLAT_MEMREGION_MAX_COUNT: 64
CONFIG_LIBUKNETDEV_EINFO_LIBPARAM: 'y'

# Debug options
CONFIG_LIBUKDEBUG_PRINTD: 'y'
CONFIG_LIBUKDEBUG_PRINTK_INFO: 'y'
CONFIG_LIBSYSCALL_SHIM_STRACE: 'y'
CONFIG_LIBSYSCALL_SHIM_DEBUG: 'y'

libraries:
lwip:
source: https://github.com/unikraft/lib-lwip.git
version: staging
kconfig:
CONFIG_LWIP_LOOPIF: 'y'
CONFIG_LWIP_UKNETDEV: 'y'
CONFIG_LWIP_LOOPBACK: 'y'
CONFIG_LWIP_TCP: 'y'
CONFIG_LWIP_UDP: 'y'
CONFIG_LWIP_RAW: 'y'
CONFIG_LWIP_WND_SCALE: 'y'
CONFIG_LWIP_TCP_KEEPALIVE: 'y'
CONFIG_LWIP_THREADS: 'y'
CONFIG_LWIP_HEAP: 'y'
CONFIG_LWIP_SOCKET: 'y'
CONFIG_LWIP_AUTOIFACE: 'y'
CONFIG_LWIP_IPV4: 'y'
CONFIG_LWIP_DHCP: 'y'
CONFIG_LWIP_DNS: 'y'
CONFIG_LWIP_NUM_TCPCON: 64
CONFIG_LWIP_NUM_TCPLISTENERS: 64
CONFIG_LWIP_ICMP: 'y'
libelf:
source: https://github.com/unikraft/lib-libelf.git
version: staging

targets:
- fc/x86_64
- qemu/x86_64
51 changes: 51 additions & 0 deletions library/network-tools/host/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
FROM debian:trixie-slim AS build

RUN apt update && apt install -y \
dnsutils

FROM scratch

COPY --from=build /usr/bin/host /usr/bin/host

# Wonder why does a simple damn DNS query utility need so many dynamic libs? Yeah, me too, me too...
COPY --from=build /lib/x86_64-linux-gnu/libjemalloc.so.2 /lib/x86_64-linux-gnu/libjemalloc.so.2
COPY --from=build /lib/x86_64-linux-gnu/libisc-9.20.2-1-Debian.so /lib/x86_64-linux-gnu/libisc-9.20.2-1-Debian.so
COPY --from=build /lib/x86_64-linux-gnu/libdns-9.20.2-1-Debian.so /lib/x86_64-linux-gnu/libdns-9.20.2-1-Debian.so
COPY --from=build /lib/x86_64-linux-gnu/libisccfg-9.20.2-1-Debian.so /lib/x86_64-linux-gnu/libisccfg-9.20.2-1-Debian.so
COPY --from=build /lib/x86_64-linux-gnu/libidn2.so.0 /lib/x86_64-linux-gnu/libidn2.so.0
COPY --from=build /lib/x86_64-linux-gnu/libedit.so.2 /lib/x86_64-linux-gnu/libedit.so.2
COPY --from=build /lib/x86_64-linux-gnu/libc.so.6 /lib/x86_64-linux-gnu/libc.so.6
COPY --from=build /lib/x86_64-linux-gnu/libm.so.6 /lib/x86_64-linux-gnu/libm.so.6
COPY --from=build /lib/x86_64-linux-gnu/libstdc++.so.6 /lib/x86_64-linux-gnu/libstdc++.so.6
COPY --from=build /lib/x86_64-linux-gnu/libgcc_s.so.1 /lib/x86_64-linux-gnu/libgcc_s.so.1
COPY --from=build /lib/x86_64-linux-gnu/libuv.so.1 /lib/x86_64-linux-gnu/libuv.so.1
COPY --from=build /lib/x86_64-linux-gnu/libssl.so.3 /lib/x86_64-linux-gnu/libssl.so.3
COPY --from=build /lib/x86_64-linux-gnu/libcrypto.so.3 /lib/x86_64-linux-gnu/libcrypto.so.3
COPY --from=build /lib/x86_64-linux-gnu/libz.so.1 /lib/x86_64-linux-gnu/libz.so.1
COPY --from=build /lib/x86_64-linux-gnu/libjson-c.so.5 /lib/x86_64-linux-gnu/libjson-c.so.5
COPY --from=build /lib/x86_64-linux-gnu/libnghttp2.so.14 /lib/x86_64-linux-gnu/libnghttp2.so.14
COPY --from=build /lib/x86_64-linux-gnu/libxml2.so.2 /lib/x86_64-linux-gnu/libxml2.so.2
COPY --from=build /lib/x86_64-linux-gnu/liburcu.so.8 /lib/x86_64-linux-gnu/liburcu.so.8
COPY --from=build /lib/x86_64-linux-gnu/liburcu-common.so.8 /lib/x86_64-linux-gnu/liburcu-common.so.8
COPY --from=build /lib64/ld-linux-x86-64.so.2 /lib64/ld-linux-x86-64.so.2
COPY --from=build /lib/x86_64-linux-gnu/libgssapi_krb5.so.2 /lib/x86_64-linux-gnu/libgssapi_krb5.so.2
COPY --from=build /lib/x86_64-linux-gnu/libkrb5.so.3 /lib/x86_64-linux-gnu/libkrb5.so.3
COPY --from=build /lib/x86_64-linux-gnu/libmaxminddb.so.0 /lib/x86_64-linux-gnu/libmaxminddb.so.0
COPY --from=build /lib/x86_64-linux-gnu/libfstrm.so.0 /lib/x86_64-linux-gnu/libfstrm.so.0
COPY --from=build /lib/x86_64-linux-gnu/libprotobuf-c.so.1 /lib/x86_64-linux-gnu/libprotobuf-c.so.1
COPY --from=build /lib/x86_64-linux-gnu/liblmdb.so.0 /lib/x86_64-linux-gnu/liblmdb.so.0
COPY --from=build /lib/x86_64-linux-gnu/liburcu-cds.so.8 /lib/x86_64-linux-gnu/liburcu-cds.so.8
COPY --from=build /lib/x86_64-linux-gnu/libns-9.20.2-1-Debian.so /lib/x86_64-linux-gnu/libns-9.20.2-1-Debian.so
COPY --from=build /lib/x86_64-linux-gnu/libunistring.so.5 /lib/x86_64-linux-gnu/libunistring.so.5
COPY --from=build /lib/x86_64-linux-gnu/libtinfo.so.6 /lib/x86_64-linux-gnu/libtinfo.so.6
COPY --from=build /lib/x86_64-linux-gnu/libbsd.so.0 /lib/x86_64-linux-gnu/libbsd.so.0
COPY --from=build /lib/x86_64-linux-gnu/libzstd.so.1 /lib/x86_64-linux-gnu/libzstd.so.1
COPY --from=build /lib/x86_64-linux-gnu/libicuuc.so.72 /lib/x86_64-linux-gnu/libicuuc.so.72
COPY --from=build /lib/x86_64-linux-gnu/liblzma.so.5 /lib/x86_64-linux-gnu/liblzma.so.5
COPY --from=build /lib/x86_64-linux-gnu/libk5crypto.so.3 /lib/x86_64-linux-gnu/libk5crypto.so.3
COPY --from=build /lib/x86_64-linux-gnu/libcom_err.so.2 /lib/x86_64-linux-gnu/libcom_err.so.2
COPY --from=build /lib/x86_64-linux-gnu/libkrb5support.so.0 /lib/x86_64-linux-gnu/libkrb5support.so.0
COPY --from=build /lib/x86_64-linux-gnu/libkeyutils.so.1 /lib/x86_64-linux-gnu/libkeyutils.so.1
COPY --from=build /lib/x86_64-linux-gnu/libresolv.so.2 /lib/x86_64-linux-gnu/libresolv.so.2
COPY --from=build /lib/x86_64-linux-gnu/libmd.so.0 /lib/x86_64-linux-gnu/libmd.so.0
COPY --from=build /lib/x86_64-linux-gnu/libicudata.so.72 /lib/x86_64-linux-gnu/libicudata.so.72
146 changes: 146 additions & 0 deletions library/network-tools/host/Kraftfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,146 @@
spec: v0.6

name: host

rootfs: ./Dockerfile

cmd: ["/usr/bin/host"]

template:
source: https://github.com/unikraft/app-elfloader.git
version: staging

unikraft:
# source: https://github.com/unikraft/unikraft.git
# version: staging
source: /home/ty3r0x/Projects/unikraft/unikraft/
kconfig:
# Configurations options for app-elfloader
# (they can't be part of the template atm)
CONFIG_APPELFLOADER_ARCH_PRCTL: 'y'
CONFIG_APPELFLOADER_BRK: 'y'
CONFIG_APPELFLOADER_CUSTOMAPPNAME: 'y'
CONFIG_APPELFLOADER_STACK_NBPAGES: 128
CONFIG_APPELFLOADER_VFSEXEC_EXECBIT: 'n'
CONFIG_APPELFLOADER_VFSEXEC: 'y'
CONFIG_APPELFLOADER_HFS: 'y'
CONFIG_APPELFLOADER_HFS_ETCRESOLVCONF: 'y'
CONFIG_APPELFLOADER_HFS_ETCHOSTS: 'y'
CONFIG_APPELFLOADER_HFS_ETCHOSTNAME: 'y'
CONFIG_APPELFLOADER_HFS_REPLACEEXIST: 'y'
# Unikraft options
CONFIG_HAVE_PAGING_DIRECTMAP: 'y'
CONFIG_HAVE_PAGING: 'y'
CONFIG_I8042: 'y'
CONFIG_LIBDEVFS_AUTOMOUNT: 'y'
CONFIG_LIBDEVFS_DEV_NULL: 'y'
CONFIG_LIBDEVFS_DEV_STDOUT: 'y'
CONFIG_LIBDEVFS_DEV_ZERO: 'y'
CONFIG_LIBDEVFS: 'y'
CONFIG_LIBPOSIX_ENVIRON_ENVP0: "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
CONFIG_LIBPOSIX_ENVIRON_ENVP1: "LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib"
CONFIG_LIBPOSIX_ENVIRON_ENVP2: "HOME=/"
CONFIG_LIBPOSIX_ENVIRON: 'y'
CONFIG_LIBPOSIX_ENVIRON_LIBPARAM: 'y'
CONFIG_LIBPOSIX_ENVIRON_LIBPARAM_MAXCOUNT: '64'
CONFIG_LIBPOSIX_EVENTFD: 'y'
CONFIG_LIBPOSIX_FDIO: 'y'
CONFIG_LIBPOSIX_FDTAB: 'y'
CONFIG_LIBPOSIX_FUTEX: 'y'
CONFIG_LIBPOSIX_MMAP: 'y'
CONFIG_LIBPOSIX_NETLINK: 'y'
CONFIG_LIBPOSIX_PIPE: 'y'
CONFIG_LIBPOSIX_POLL: 'y'
CONFIG_LIBPOSIX_PROCESS_CLONE: 'y'
CONFIG_LIBPOSIX_SOCKET: 'y'
CONFIG_LIBPOSIX_SYSINFO: 'y'
CONFIG_LIBPOSIX_TIME: 'y'
CONFIG_LIBPOSIX_TIMERFD: 'y'
CONFIG_LIBPOSIX_UNIXSOCKET: 'y'
CONFIG_LIBPOSIX_USER_GID: 0
CONFIG_LIBPOSIX_USER_GROUPNAME: "root"
CONFIG_LIBPOSIX_USER_UID: 0
CONFIG_LIBPOSIX_USER_USERNAME: "root"
CONFIG_LIBPOSIX_USER: 'y'
CONFIG_LIBRAMFS: 'y'
CONFIG_LIBSYSCALL_SHIM_HANDLER_ULTLS: 'y'
CONFIG_LIBSYSCALL_SHIM_HANDLER: 'y'
CONFIG_LIBSYSCALL_SHIM_LEGACY_VERBOSE: 'y'
CONFIG_LIBSYSCALL_SHIM: 'y'
CONFIG_LIBUKRANDOM_GETRANDOM: 'y'
CONFIG_LIBUKALLOCPOOL: 'y'
CONFIG_LIBUKBLKDEV_MAXNBQUEUES: '1'
CONFIG_LIBUKBLKDEV_DISPATCHERTHREADS: 'y'
CONFIG_LIBUKBLKDEV_SYNC_IO_BLOCKED_WAITING: 'y'
CONFIG_LIBUKBLKDEV: 'y'
CONFIG_LIBUKBOOT_BANNER_MINIMAL: 'y'
CONFIG_LIBUKBOOT_HEAP_BASE: '0x400000000'
CONFIG_LIBUKBOOT_MAINTHREAD: 'y'
CONFIG_LIBUKBOOT_SHUTDOWNREQ_HANDLER: 'y'
CONFIG_LIBUKCPIO: 'y'
CONFIG_LIBUKDEBUG_CRASH_SCREEN: 'y'
CONFIG_LIBUKDEBUG_ENABLE_ASSERT: 'y'
CONFIG_LIBUKDEBUG_PRINT_SRCNAME: 'n'
CONFIG_LIBUKDEBUG_PRINT_TIME: 'y'
CONFIG_LIBUKDEBUG_PRINTK_ERR: 'y'
CONFIG_LIBUKDEBUG_PRINTK: 'y'
CONFIG_LIBUKDEBUG: 'y'
CONFIG_LIBUKFALLOC: 'y'
CONFIG_LIBUKMPI: 'n'
CONFIG_LIBUKSIGNAL: 'y'
CONFIG_LIBUKRANDOM_DEVFS: 'y'
CONFIG_LIBUKRANDOM: 'y'
CONFIG_LIBUKVMEM_DEFAULT_BASE: '0x0000001000000000'
CONFIG_LIBUKVMEM_DEMAND_PAGE_IN_SIZE: 12
CONFIG_LIBUKVMEM_PAGEFAULT_HANDLER_PRIO: 4
CONFIG_LIBUKVMEM: 'y'
CONFIG_LIBVFSCORE_AUTOMOUNT_CI: 'y'
CONFIG_LIBVFSCORE_AUTOMOUNT_CI_EINITRD: 'y'
CONFIG_LIBVFSCORE_AUTOMOUNT_UP: 'y'
CONFIG_LIBVFSCORE_AUTOMOUNT: 'y'
CONFIG_LIBVFSCORE_NONLARGEFILE: 'y'
CONFIG_LIBVFSCORE: 'y'
CONFIG_LIBUK9P: 'y'
CONFIG_OPTIMIZE_DEADELIM: 'y'
CONFIG_OPTIMIZE_LTO: 'y'
CONFIG_PAGING: 'y'
CONFIG_STACK_SIZE_PAGE_ORDER: 4 # 128 * 4K = 512K
CONFIG_UKPLAT_MEMREGION_MAX_COUNT: 64
CONFIG_LIBUKNETDEV_EINFO_LIBPARAM: 'y'

# Debug options
CONFIG_LIBUKDEBUG_PRINTD: 'y'
CONFIG_LIBUKDEBUG_PRINTK_INFO: 'y'
CONFIG_LIBSYSCALL_SHIM_STRACE: 'y'
CONFIG_LIBSYSCALL_SHIM_DEBUG: 'y'

libraries:
lwip:
source: https://github.com/unikraft/lib-lwip.git
version: staging
kconfig:
CONFIG_LWIP_LOOPIF: 'y'
CONFIG_LWIP_UKNETDEV: 'y'
CONFIG_LWIP_LOOPBACK: 'y'
CONFIG_LWIP_TCP: 'y'
CONFIG_LWIP_UDP: 'y'
CONFIG_LWIP_RAW: 'y'
CONFIG_LWIP_WND_SCALE: 'y'
CONFIG_LWIP_TCP_KEEPALIVE: 'y'
CONFIG_LWIP_THREADS: 'y'
CONFIG_LWIP_HEAP: 'y'
CONFIG_LWIP_SOCKET: 'y'
CONFIG_LWIP_AUTOIFACE: 'y'
CONFIG_LWIP_IPV4: 'y'
CONFIG_LWIP_DHCP: 'y'
CONFIG_LWIP_DNS: 'y'
CONFIG_LWIP_NUM_TCPCON: 64
CONFIG_LWIP_NUM_TCPLISTENERS: 64
CONFIG_LWIP_ICMP: 'y'
libelf:
source: https://github.com/unikraft/lib-libelf.git
version: staging

targets:
- fc/x86_64
- qemu/x86_64
15 changes: 15 additions & 0 deletions library/network-tools/mtr/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
FROM alpine:3.20.3 AS build

RUN apk add --no-cache \
mtr

FROM scratch

COPY --from=build /usr/sbin/mtr /usr/sbin/mtr
COPY --from=build /usr/sbin/mtr-packet /usr/sbin/mtr-packet

COPY --from=build /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1
COPY --from=build /usr/lib/libjansson.so.4 /usr/lib/libjansson.so.4
COPY --from=build /usr/lib/libncursesw.so.6 /usr/lib/libncursesw.so.6
COPY --from=build /lib/ld-musl-x86_64.so.1 /lib/ld-musl-x86_64.so.1

Loading

0 comments on commit 2d25654

Please sign in to comment.