update
This commit is contained in:
parent
36a8e795d9
commit
55b501ccd2
@ -39,26 +39,21 @@ RUN case "${BUILD_ARCH}" in \
|
||||
chmod +x /etc/cont-init.d/promtail_setup.sh; \
|
||||
chmod +x /etc/services.d/promtail/*;
|
||||
|
||||
# Install necessary packages
|
||||
RUN apk add --no-cache curl tar unzip && \
|
||||
# Remove nsswitch.conf to avoid conflicts with glibc
|
||||
rm -f /etc/nsswitch.conf && \
|
||||
# Add the public key for sgerrand glibc packages
|
||||
curl -Lo /etc/apk/keys/sgerrand.rsa.pub https://alpine-pkgs.sgerrand.com/sgerrand.rsa.pub && \
|
||||
# Download and install glibc
|
||||
curl -Lo glibc.apk https://github.com/sgerrand/alpine-pkg-glibc/releases/download/2.35-r0/glibc-2.35-r0.apk && \
|
||||
apk add glibc.apk && \
|
||||
rm glibc.apk
|
||||
# Install dependencies for building Promtail
|
||||
RUN apk add --no-cache go git build-base
|
||||
|
||||
# Download and install Promtail
|
||||
RUN curl -s -J -L -o promtail-linux-amd64.zip \
|
||||
"https://github.com/grafana/loki/releases/download/v${PROMTAIL_VERSION}/promtail-linux-amd64.zip" && \
|
||||
unzip promtail-linux-amd64.zip -d /usr/bin && \
|
||||
mv /usr/bin/promtail-linux-amd64 /usr/bin/promtail && \
|
||||
chmod a+x /usr/bin/promtail && \
|
||||
rm promtail-linux-amd64.zip
|
||||
# Download the Promtail source code
|
||||
RUN git clone --branch "v${PROMTAIL_VERSION}" https://github.com/grafana/loki.git /promtail-src
|
||||
|
||||
# Verify Promtail installation
|
||||
# Build Promtail
|
||||
WORKDIR /promtail-src/clients/cmd/promtail
|
||||
RUN go build -o /usr/bin/promtail
|
||||
|
||||
# Clean up source and unnecessary packages
|
||||
RUN apk del go git build-base && \
|
||||
rm -rf /promtail-src
|
||||
|
||||
# Verify the installation
|
||||
RUN /usr/bin/promtail -version
|
||||
|
||||
WORKDIR /data/promtail
|
||||
|
Loading…
x
Reference in New Issue
Block a user