palw3ey/ye3tftp

By palw3ey

Updated almost 2 years ago

A docker TFTP server based on tftp-hpa and Alpine. Light, below 10 Mb. GNS3 ready.

Image
Networking
0

2.0K

palw3ey/ye3tftp repository overview

ye3tftp

A docker TFTP server based on tftp-hpa and Alpine. Light, below 10 Mb. GNS3 ready.

The /data folder is persistent.

Simple usage

docker run -dt --name mytftp -e Y_CREATE=yes -e Y_CHMOD=777 palw3ey/ye3tftp

Test

  • From the host
# create a test file :
docker exec -it mytftp sh --login -c "echo it_works > /data/test.txt"

# get container IP :
docker inspect --format='{{.NetworkSettings.IPAddress}}' mytftp

# install a tftp client
apt install tftp-hpa

# get the test file through the tftp client
tftp 192.168.9.150 69
  get test.txt
  quit

# show the content of the test file
cat test.txt

HOWTOs

  • Mount to your host folder /home/tux/Downloads
docker run -dt --name mytftp -v /home/tux/Downloads:/data -e Y_CREATE=yes -e Y_CHMOD=777 palw3ey/ye3tftp
  • Map to your host port 1069
docker run -dt --name mytftp -p 1069:69/udp -e Y_CREATE=yes -e Y_CHMOD=777 palw3ey/ye3tftp

GNS3

To run through GNS3, download and import the appliance : ye3tftp.gns3a

How to connect the docker container in the GNS3 topology ?

Drag and drop the device in the topology. Right click on the device and select "Edit config".
If you want a static configuration, uncomment the lines just below # Static config for eth0 or otherwise # DHCP config for eth0 for a dhcp configuration. Click "Save".
Add a link to connect the device to a switch or router. Finally, right click on the device, select "Start".
To see the output, right click "Console".
To type commands, right click "Auxiliary console".

Environment Variables

These are the env variables and their default values.

variablesformatdefaultdescription
Y_LANGUAGEtextfr_FRLanguage. The list is in the folder /i18n/
Y_DEBUGyes/nonoyes, Run tftpd with verbose (--verbosity 4) option
Y_IPIP address0.0.0.0IP address to listen to
Y_PORTport number69Port to listen to
Y_CREATEyes/nonoyes, Allow new files to be created
Y_CHMODinteger permissionchmod to apply to /data/ folder. Has no default value by default, this mean : dont modify permission. Useful number 444 or 777.
Y_CHMOD_RECURSIVEyes/nonoapply chmod recursively, this mean : to all files and folder in /data/

Compatibility

The docker image was compiled to work on these CPU architectures :

  • linux/386
  • linux/amd64
  • linux/arm/v6
  • linux/arm/v7
  • linux/arm64
  • linux/ppc64le
  • linux/s390x

Work on most computers including Raspberry Pi

Build

To customize and create your own images.

git clone https://github.com/palw3ey/ye3tftp.git
cd ye3tftp
# Make all your modifications, then :
docker build --no-cache --network=host -t ye3tftp .
docker run -dt --name my_customized_tftp ye3tftp

Documentation

tftpd man page

Version

nameversion
ye3tftp1.0.0
tftp-hpa5.2
alpine3.18.4

Changelog

[1.0.0] - 2023-12-02

Added
  • first release

ToDo

  • need to document env variables (2023-12-18)
  • add more translation files in i18n folder. Contribute ! Send me your translations by mail ;)

Don't hesitate to send me your contributions, issues, improvements on github or by mail.

License

MIT
author: palw3ey
maintainer: palw3ey
email: [email protected]
website: https://github.com/palw3ey/ye3tftp
docker hub: https://hub.docker.com/r/palw3ey/ye3tftp

Tag summary

Content type

Image

Digest

sha256:bd27ac9c3

Size

3.3 MB

Last updated

almost 2 years ago

docker pull palw3ey/ye3tftp:1.0.0