-
Notifications
You must be signed in to change notification settings - Fork 66
/
logger.Dockerfile
36 lines (29 loc) · 1.17 KB
/
logger.Dockerfile
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
29
30
31
32
33
34
35
36
FROM redhat/ubi8:latest AS builder
ARG VERSION
ARG TARGETPLATFORM
# Install Vector
ENV VECTOR_VERSION=0.39.0
RUN case ${TARGETPLATFORM} in \
"linux/amd64") VECTOR_ARCH=x86_64 ;; \
"linux/arm64") VECTOR_ARCH=aarch64 ;; \
esac \
&& rpm -i https://packages.timber.io/vector/${VECTOR_VERSION}/vector-${VECTOR_VERSION}-1.${VECTOR_ARCH}.rpm
FROM redhat/ubi8-micro:latest
ARG VERSION
ARG TARGETPLATFORM
LABEL maintainer="DataStax, Inc <[email protected]>"
LABEL name="system-logger"
LABEL vendor="DataStax, Inc"
LABEL release="${VERSION}"
LABEL version="${VERSION}"
LABEL summary="Sidecar for DataStax Kubernetes Operator for Apache Cassandra "
LABEL description="Sidecar to output Cassandra system logs to stdout"
# Copy our configuration
COPY ./config/logger/vector_config.toml /etc/vector/vector.toml
COPY --from=builder /usr/lib64/libstdc++.so.6 /usr/lib64/libstdc++.so.6
COPY --from=builder /usr/bin/vector /usr/bin/vector
ADD https://raw.githubusercontent.com/vectordotdev/vector/master/LICENSE /licences/LICENSE
COPY ./LICENSE.txt /licenses/
# Non-root user, cassandra as default
USER cassandra
ENTRYPOINT ["/usr/bin/vector", "--config", "/etc/vector/vector.toml"]