Simple & slim TFTP server using dnsmasq, containerized for easy deployment and management.
Find a file
Phil d68d167438
All checks were successful
ci/woodpecker/push/woodpecker Pipeline was successful
Modified README.md
2025-09-28 20:39:11 +02:00
.gitignore Initial commit 2025-07-27 09:35:50 +00:00
.woodpecker.yml Added latest image to scan 2025-09-28 20:30:05 +02:00
CHANGELOG.md Changed Changelog 2025-09-28 00:28:13 +02:00
Dockerfile Refactor Dockerfile and scripts; add CHANGELOG.md 2025-09-28 00:17:12 +02:00
init.sh Refactor Dockerfile and scripts; add CHANGELOG.md 2025-09-28 00:17:12 +02:00
LICENSE Initial commit 2025-07-27 09:35:50 +00:00
README.md Modified README.md 2025-09-28 20:39:11 +02:00
start.sh Refactor Dockerfile and scripts; add CHANGELOG.md 2025-09-28 00:17:12 +02:00

docker-tftp

Simple & slim TFTP server using dnsmasq, containerized for easy deployment and management.

Overview

This project provides a lightweight, containerized TFTP (Trivial File Transfer Protocol) server using dnsmasq as the backend. It's designed for simplicity, security, and ease of deployment in various environments.

Features

  • Containerized Deployment: Easy deployment using Docker with minimal dependencies
  • Security Focused: Runs with minimal privileges and includes security features like tftp-secure
  • Cross-Platform: Works on any system that supports Docker
  • Easy Configuration: Simple environment variables for customization
  • Health Monitoring: Built-in healthcheck for container orchestration systems

Quick Start

Prerequisites

  • Docker or compatible container runtime
  • Basic understanding of TFTP protocol

Quick Deployment

  1. Run the container:
docker run -d \
  --name tftp-server \
  -p 69:69/udp \
  -v /path/to/your/tftp-folder:/tftp \
  git.hackmi.ch/phil/docker-tftp:latest

Configuration

Environment Variables

The following environment variables can be set to customize the container:

  • PUID (default: 1000): User ID for the tftp process
  • PGID (default: 1000): Group ID for the tftp process
  • TFTP_ROOT: Root directory for TFTP operations (default: /tftp)

Volume Mounting

For persistent storage and file sharing, mount your desired directory to /tftp in the container.

Advanced Usage

Custom Configuration

You can customize the dnsmasq configuration by creating a custom config file and mounting it to /etc/dnsmasq.conf in the container.

Health Checking

The container includes a healthcheck that verifies the TFTP service is responsive on port 69.

Integration Tests

The project includes test scripts to validate functionality in CI/CD pipelines.

Building from Source

  1. Clone the repository: git clone https://git.hackmi.ch/phil/docker-tftp.git
  2. Build the image: docker build -t docker-tftp .
  3. Test locally: Use the quick start instructions above

License

This project is licensed under the MIT License. See the LICENSE file for details.