mirror of
https://codeberg.org/angestoepselt/pxe-stack.git
synced 2025-05-24 15:16:16 +00:00
fix permission issues with the tftp volume
This commit is contained in:
parent
eaaf9da1d9
commit
d0c6d9e9f2
3 changed files with 23 additions and 14 deletions
3
.env
Normal file
3
.env
Normal file
|
|
@ -0,0 +1,3 @@
|
||||||
|
COMPOSE_PROJECT_NAME=pxe-stack
|
||||||
|
# this repo will be cloned on every restart of the container
|
||||||
|
GIT_REPO_URL=https://git.mailbro.de/angestoepselt/LinuxPXE.git
|
||||||
|
|
@ -24,6 +24,14 @@ services:
|
||||||
start_period: 20s
|
start_period: 20s
|
||||||
timeout: 10s
|
timeout: 10s
|
||||||
|
|
||||||
|
git-init:
|
||||||
|
image: codeberg.org/angestoepselt/git-alpine:latest
|
||||||
|
security_opt:
|
||||||
|
- no-new-privileges:true
|
||||||
|
container_name: git-init
|
||||||
|
volumes:
|
||||||
|
- tftp-data:/git
|
||||||
|
|
||||||
nginx:
|
nginx:
|
||||||
<<: *common-keys-core # see variables at the top of the yml file
|
<<: *common-keys-core # see variables at the top of the yml file
|
||||||
image: nginx:mainline-alpine3.17-slim
|
image: nginx:mainline-alpine3.17-slim
|
||||||
|
|
@ -48,19 +56,10 @@ services:
|
||||||
- "69:69/udp"
|
- "69:69/udp"
|
||||||
volumes:
|
volumes:
|
||||||
- tftp-data:/var/tftp
|
- tftp-data:/var/tftp
|
||||||
|
depends_on:
|
||||||
|
- git-init
|
||||||
# this image has a build in healthcheck
|
# this image has a build in healthcheck
|
||||||
|
|
||||||
git-init:
|
|
||||||
image: codeberg.org/angestoepselt/git-alpine:latest
|
|
||||||
security_opt:
|
|
||||||
- no-new-privileges:true
|
|
||||||
container_name: git-init
|
|
||||||
volumes:
|
|
||||||
- tftp-data:/git
|
|
||||||
environment:
|
|
||||||
# this repo will be cloned on every restart of the container
|
|
||||||
- GIT_REPO_URL=https://git.mailbro.de/angestoepselt/LinuxPXE.git
|
|
||||||
|
|
||||||
volumes:
|
volumes:
|
||||||
cache:
|
cache:
|
||||||
config:
|
config:
|
||||||
|
|
|
||||||
|
|
@ -9,14 +9,21 @@ ENV ADDR="127.0.0.1" \
|
||||||
RUN apk update ; \
|
RUN apk update ; \
|
||||||
apk upgrade ; \
|
apk upgrade ; \
|
||||||
apk add --no-cache --update tftp-hpa ; \
|
apk add --no-cache --update tftp-hpa ; \
|
||||||
rm /var/cache/apk/*
|
rm /var/cache/apk/* \
|
||||||
|
; \
|
||||||
VOLUME /var/tftp
|
adduser -D -u 1000 non-privileged ; \
|
||||||
|
mkdir $ROOT ; \
|
||||||
|
chown -R 1000:1000 $ROOT
|
||||||
|
|
||||||
|
VOLUME $ROOT
|
||||||
|
|
||||||
EXPOSE 69/udp
|
EXPOSE 69/udp
|
||||||
|
|
||||||
COPY tftp.conf /etc/init/
|
COPY tftp.conf /etc/init/
|
||||||
|
|
||||||
|
# Switch to the non-privileged user
|
||||||
|
USER 1000
|
||||||
|
|
||||||
ENTRYPOINT ["in.tftpd"]
|
ENTRYPOINT ["in.tftpd"]
|
||||||
CMD ["-Lv", "-s", "/var/tftp"]
|
CMD ["-Lv", "-s", "/var/tftp"]
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue