forked from signalfx/signalfx-agent
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile.rhel
38 lines (28 loc) · 1.2 KB
/
Dockerfile.rhel
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
37
38
FROM registry.access.redhat.com/rhel7-atomic
ARG AGENT_VERSION="4.13.0"
LABEL name="SignalFx Smart Agent" \
maintainer="SignalFx, Inc." \
vendor="SignalFx, Inc." \
version="${AGENT_VERSION}" \
release="1" \
summary="The SignalFx Smart Agent" \
description="The SignalFx Smart Agent" \
io.k8s.display-name="SignalFx Smart Agent" \
io.k8s.description="The SignalFx Smart Agent" \
io.openshift.tags=""
RUN mkdir -p /licenses
COPY LICENSE /licenses/
USER root
CMD ["/usr/bin/signalfx-agent"]
COPY packaging/rpm/signalfx-agent.repo /etc/yum.repos.d/signalfx-agent.repo
RUN rpm --import https://dl.signalfx.com/yum-rpm.key
RUN microdnf install --enablerepo=rhel-7-server-rpms signalfx-agent-${AGENT_VERSION}-1 &&\
microdnf clean all
RUN setcap -r /usr/lib/signalfx-agent/bin/signalfx-agent &&\
mkdir -p /var/run/signalfx-agent &&\
chown signalfx-agent.signalfx-agent /var/run/signalfx-agent &&\
chmod 777 /var/run/signalfx-agent
COPY deployments/docker/agent.yaml /tmp/agent.yaml
RUN sed -e 's#/lib/whitelist.json#/usr/lib/signalfx-agent/whitelist.json#' /tmp/agent.yaml > /etc/signalfx/agent.yaml
COPY whitelist.json /usr/lib/signalfx-agent/whitelist.json
USER signalfx-agent