1
0
mirror of https://github.com/thib8956/nginx-proxy synced 2025-02-24 01:38:15 +00:00

Merge pull request #2440 from nginx-proxy/web-image-alpine

test: use python alpine variant as base for web image
This commit is contained in:
Nicolas Duchon 2024-05-05 17:48:43 +02:00 committed by GitHub
commit c4c65a4441
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 5 deletions

View File

@ -1,6 +1,7 @@
# Docker Image running one (or multiple) webservers listening on all given ports from WEB_PORTS environment variable # Docker Image running one (or multiple) webservers listening on all given ports from WEB_PORTS environment variable
FROM python:3 FROM python:3-alpine
RUN apk add --no-cache bash
COPY ./webserver.py / COPY ./webserver.py /
COPY ./entrypoint.sh / COPY ./entrypoint.sh /
WORKDIR /opt WORKDIR /opt

View File

@ -5,11 +5,11 @@ trap '[ ${#PIDS[@]} -gt 0 ] && kill -TERM ${PIDS[@]}' TERM
declare -a PIDS declare -a PIDS
for port in $WEB_PORTS; do for port in $WEB_PORTS; do
echo starting a web server listening on port $port; echo starting a web server listening on port "$port";
/webserver.py $port & /webserver.py "$port" &
PIDS+=($!) PIDS+=($!)
done done
wait ${PIDS[@]} wait "${PIDS[@]}"
trap - TERM trap - TERM
wait ${PIDS[@]} wait "${PIDS[@]}"