Compare commits
No commits in common. "6bf853cc3fac4320d22ef107e66d659858b98089" and "1f286f7713e7c8437fb4b33957da8996fa6ce48b" have entirely different histories.
6bf853cc3f
...
1f286f7713
4 changed files with 0 additions and 81 deletions
22
Dockerfile
22
Dockerfile
|
@ -1,22 +0,0 @@
|
|||
FROM alpine:3.22.0
|
||||
|
||||
LABEL maintainer="Phil <phil@hackmi.ch>"
|
||||
LABEL version="0.1"
|
||||
LABEL description="Docker image for TFTP server using dnsmasq"
|
||||
|
||||
|
||||
WORKDIR /
|
||||
|
||||
RUN apk add --no-cache \
|
||||
bash \
|
||||
dnsmasq
|
||||
|
||||
EXPOSE 69/udp
|
||||
|
||||
COPY start.sh init.sh /
|
||||
|
||||
RUN chmod +x start.sh init.sh
|
||||
|
||||
VOLUME ["/tftp"]
|
||||
|
||||
ENTRYPOINT ["./start.sh"]
|
|
@ -1,24 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Configure user and group IDs
|
||||
PUID=${PUID:-1000}
|
||||
PGID=${PGID:-1000}
|
||||
|
||||
echo "[init] Setting up user nbxyz with PUID=${PUID} and PGID=${PGID}"
|
||||
|
||||
if ! getent group ${PGID} > /dev/null 2>&1; then
|
||||
addgroup --gid ${PGID} tftp
|
||||
else
|
||||
echo "[init] Group with GID ${PGID} already exists"
|
||||
fi
|
||||
|
||||
if ! getent passwd ${PUID} > /dev/null 2>&1; then
|
||||
adduser -u ${PUID} -G tftp -h /tftp -s /bin/false -D tftp
|
||||
else
|
||||
echo "[init] User with UID ${PUID} already exists"
|
||||
fi
|
||||
|
||||
usermod -a -G users tftp 2>/dev/null || true
|
||||
|
||||
chown -R nbxyz:nbxyz /tftp
|
||||
chmod -R 7777 -R /tftp
|
|
@ -1,13 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Init File
|
||||
/init.sh
|
||||
|
||||
# Wrapper script for dnsmasq to ensure TFTP logs are visible in docker logs
|
||||
echo "[dnsmasq] Starting TFTP server on port 69"
|
||||
echo "[dnsmasq] TFTP root: /config/menus"
|
||||
echo "[dnsmasq] TFTP security: enabled"
|
||||
echo "[dnsmasq] Logging: enabled (dhcp and queries)"
|
||||
|
||||
# Start dnsmasq as root to bind to port 69, then drop privileges to tftp
|
||||
exec /usr/sbin/dnsmasq --port=0 --keep-in-foreground --enable-tftp --user=tftp --tftp-secure --tftp-root=/tftp --log-facility=- --log-dhcp --log-queries "$@"
|
|
@ -1,22 +0,0 @@
|
|||
when:
|
||||
branch: main
|
||||
event: push
|
||||
|
||||
variables:
|
||||
- &repo git.hackmi.ch/${CI_REPO_OWNER}/${CI_REPO_NAME}
|
||||
|
||||
steps:
|
||||
publish:
|
||||
image: docker.io/woodpeckerci/plugin-docker-buildx:latest
|
||||
settings:
|
||||
platforms: linux/amd64
|
||||
repo: *repo
|
||||
registry: git.hackmi.ch
|
||||
tags: latest
|
||||
username:
|
||||
from_secret: git-package-user
|
||||
password:
|
||||
from_secret: git-package-pw
|
||||
when:
|
||||
branch: main
|
||||
event: push
|
Loading…
Add table
Add a link
Reference in a new issue