Update Dockerfile
This commit is contained in:
parent
b49d6e8364
commit
6ed0ffa4d8
20
Dockerfile
20
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"]
|
||||
|
||||
# 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"]
|
||||
|
|
Loading…
Reference in New Issue