-
Notifications
You must be signed in to change notification settings - Fork 2.3k
/
Copy pathDockerfile
23 lines (14 loc) · 965 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
FROM nginx:1.27.3-otel
RUN apt-get update ; apt-get install lsb-release --no-install-recommends --no-install-suggests -y
# This file is needed for nginx-module-otel to be found.
RUN echo "deb [signed-by=/usr/share/keyrings/nginx-archive-keyring.gpg] http://nginx.org/packages/mainline/debian `lsb_release -cs` nginx" | tee /etc/apt/sources.list.d/nginx.list
RUN apt-get update ; apt-get install nginx-module-otel --no-install-recommends --no-install-suggests -y
RUN mkdir /static
COPY src/image-provider/static /static
EXPOSE ${IMAGE_PROVIDER_PORT}
STOPSIGNAL SIGQUIT
COPY src/image-provider/nginx.conf.template /nginx.conf.template
# Start nginx
CMD ["/bin/sh" , "-c" , "envsubst '$OTEL_COLLECTOR_HOST $IMAGE_PROVIDER_PORT $OTEL_COLLECTOR_PORT_GRPC $OTEL_SERVICE_NAME' < /nginx.conf.template > /etc/nginx/nginx.conf && cat /etc/nginx/nginx.conf && exec nginx -g 'daemon off;'"]