|
||
---|---|---|
.gitignore | ||
.woodpecker.yml | ||
CHANGELOG.md | ||
Dockerfile | ||
init.sh | ||
LICENSE | ||
README.md | ||
start.sh |
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
- 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 processPGID
(default: 1000): Group ID for the tftp processTFTP_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
- Clone the repository:
git clone https://git.hackmi.ch/phil/docker-tftp.git
- Build the image:
docker build -t docker-tftp .
- Test locally: Use the quick start instructions above
License
This project is licensed under the MIT License. See the LICENSE file for details.