forked from open-telemetry/opentelemetry-demo
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
28 lines (19 loc) · 808 Bytes
/
Dockerfile
File metadata and controls
28 lines (19 loc) · 808 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# Copyright The OpenTelemetry Authors
# SPDX-License-Identifier: Apache-2.0
FROM nginxinc/nginx-unprivileged:1.27.5-alpine3.21
USER 0
RUN printf "%s%s%s%s\n" \
"@nginx " \
"http://nginx.org/packages/mainline/alpine/v" \
`egrep -o '^[0-9]+\.[0-9]+' /etc/alpine-release` \
"/main" \
| tee -a /etc/apk/repositories
RUN apk update && \
apk add nginx-module-otel@nginx
USER 101
COPY src/image-provider/static/ /static/
COPY src/image-provider/nginx.conf.template /nginx.conf.template
EXPOSE ${IMAGE_PROVIDER_PORT}
STOPSIGNAL SIGQUIT
# 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;'"]