18 lines
473 B
Docker
18 lines
473 B
Docker
# Use the official NGINX image as a parent image
|
|
FROM nginx:alpine
|
|
|
|
# Set environment variables with default values
|
|
ENV BACKEND_HOST=localhost
|
|
ENV BACKEND_TCP_PORT=80
|
|
ENV BACKEND_UDP_PORT=12345
|
|
|
|
# Copy the script and configuration template into the container
|
|
COPY entrypoint.sh /entrypoint.sh
|
|
COPY nginx.conf.template /etc/nginx/nginx.conf.template
|
|
|
|
# Make the script executable
|
|
RUN chmod +x /entrypoint.sh
|
|
|
|
# Use the script as the entrypoint
|
|
ENTRYPOINT ["/entrypoint.sh"]
|