首次提交
All checks were successful
Build and Push TFTP Docker Image / docker-build-push (push) Successful in 29s

This commit is contained in:
Wang Defa
2025-12-03 11:32:26 +08:00
commit faaa117594
3 changed files with 123 additions and 0 deletions

25
entrypoint.sh Normal file
View File

@@ -0,0 +1,25 @@
#!/bin/sh
TFTPBOOT_DIR="/var/lib/tftpboot"
if [ "$DOWNLOAD_NETBOOT_XYZ" = "true" ]; then
echo "DOWNLOAD_NETBOOT_XYZ is true. Downloading netboot.xyz files..."
mkdir -p "$TFTPBOOT_DIR"
curl -o "$TFTPBOOT_DIR/netboot.xyz-arm64.efi" https://boot.netboot.xyz/ipxe/netboot.xyz-arm64.efi
if [ $? -ne 0 ]; then
echo "Error downloading netboot.xyz-arm64.efi"
fi
curl -o "$TFTPBOOT_DIR/netboot.xyz.efi" https://boot.netboot.xyz/ipxe/netboot.xyz.efi
if [ $? -ne 0 ]; then
echo "Error downloading netboot.xyz.efi"
fi
echo "Download complete."
else
echo "DOWNLOAD_NETBOOT_XYZ is not true or not set. Skipping netboot.xyz file download."
fi
exec /usr/sbin/in.tftpd -L -vvv -u ftp --secure --address "0.0.0.0:69" "$TFTPBOOT_DIR"