diff --git a/Dockerfile b/Dockerfile index ca63a75..2776f2e 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,5 +1,17 @@ +# Use the official NGINX image as a parent image FROM nginx:alpine -COPY nginx.conf /etc/nginx/nginx.conf.template -COPY docker-entrypoint.sh /docker-entrypoint.sh -RUN chmod +x /docker-entrypoint.sh -ENTRYPOINT ["/docker-entrypoint.sh"] \ No newline at end of file + +# 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"]