From 0a7a4b15fed173f8e7af9e9cdad83c7b0e757016 Mon Sep 17 00:00:00 2001 From: Daniel Schulze Date: Thu, 23 Jun 2022 17:29:42 +0200 Subject: [PATCH] Working OpenTelemetry sidecar (base nginx image) (#8719) * Delete entrypoint script and add sidecar lib path * make otel libs path otel specific * add description * remove library path adaption from nginx base image --- images/nginx/rootfs/Dockerfile | 6 +----- images/nginx/rootfs/entrypoint.sh | 27 --------------------------- 2 files changed, 1 insertion(+), 32 deletions(-) delete mode 100755 images/nginx/rootfs/entrypoint.sh diff --git a/images/nginx/rootfs/Dockerfile b/images/nginx/rootfs/Dockerfile index 75c63cff12..2371acd820 100644 --- a/images/nginx/rootfs/Dockerfile +++ b/images/nginx/rootfs/Dockerfile @@ -31,10 +31,8 @@ ENV LUA_CPATH="/usr/local/lib/lua/?/?.so;/usr/local/lib/lua/?.so;;" COPY --from=builder /usr/local /usr/local COPY --from=builder /opt /opt COPY --from=builder /etc/nginx /etc/nginx -COPY --from=builder entrypoint.sh /usr/local/entrypoint.sh -RUN chmod +x /usr/local/entrypoint.sh \ - && apk update \ +RUN apk update \ && apk upgrade \ && apk add -U --no-cache \ bash \ @@ -73,6 +71,4 @@ RUN chmod +x /usr/local/entrypoint.sh \ EXPOSE 80 443 -ENTRYPOINT ["/usr/local/entrypoint.sh"] - CMD ["nginx", "-g", "daemon off;"] diff --git a/images/nginx/rootfs/entrypoint.sh b/images/nginx/rootfs/entrypoint.sh deleted file mode 100755 index 9479831f1f..0000000000 --- a/images/nginx/rootfs/entrypoint.sh +++ /dev/null @@ -1,27 +0,0 @@ -#!/bin/bash - -# Copyright 2022 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# See the License for the specific language governing permissions and -# limitations under the License. - -set -o errexit -set -o nounset -set -o pipefail - -if [ -d "/modules_mount/etc/nginx/modules" ]; then - for dir in /modules_mount/etc/nginx/modules/*; do - cp "$dir"/* "/etc/nginx/modules/$(basename "$dir")" - done -fi - -exec "$@"