-
Notifications
You must be signed in to change notification settings - Fork 189
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refactor the entrypoint for easier maintenance
- Loading branch information
1 parent
795c013
commit e37973b
Showing
12 changed files
with
314 additions
and
523 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,12 @@ FROM debian:jessie | |
MAINTAINER Datadog <[email protected]> | ||
|
||
ENV DOCKER_DD_AGENT=yes \ | ||
AGENT_VERSION=1:5.16.0-1 | ||
AGENT_VERSION=1:5.16.0-1 \ | ||
PATH="/opt/datadog-agent/embedded/bin:/opt/datadog-agent/bin:${PATH}" \ | ||
PYTHONPATH=/opt/datadog-agent/agent \ | ||
DD_CONF_LOG_TO_SYSLOG=no \ | ||
NON_LOCAL_TRAFFIC=yes \ | ||
DD_SUPERVISOR_DELETE_USER=yes | ||
|
||
# Install the Agent | ||
RUN echo "deb http://apt.datadoghq.com/ stable main" > /etc/apt/sources.list.d/datadog.list \ | ||
|
@@ -15,15 +20,9 @@ RUN echo "deb http://apt.datadoghq.com/ stable main" > /etc/apt/sources.list.d/d | |
&& rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
# Configure the Agent | ||
# 1. Listen to statsd (8125) and traces (8126) from other containers | ||
# 2. Turn syslog off | ||
# 3. Remove dd-agent user from supervisor configuration | ||
# 4. Remove dd-agent user from init.d configuration | ||
# 5. Fix permission on /etc/init.d/datadog-agent | ||
# 1. Remove dd-agent user from init.d configuration | ||
# 2. Fix permission on /etc/init.d/datadog-agent | ||
RUN mv /etc/dd-agent/datadog.conf.example /etc/dd-agent/datadog.conf \ | ||
&& sed -i -e"s/^.*non_local_traffic:.*$/non_local_traffic: yes/" /etc/dd-agent/datadog.conf \ | ||
&& sed -i -e"s/^.*log_to_syslog:.*$/log_to_syslog: no/" /etc/dd-agent/datadog.conf \ | ||
&& sed -i "/user=dd-agent/d" /etc/dd-agent/supervisor.conf \ | ||
&& sed -i 's/AGENTUSER="dd-agent"/AGENTUSER="root"/g' /etc/init.d/datadog-agent \ | ||
&& rm /etc/dd-agent/conf.d/network.yaml.default \ | ||
|| chmod +x /etc/init.d/datadog-agent | ||
|
@@ -33,6 +32,8 @@ COPY conf.d/docker_daemon.yaml /etc/dd-agent/conf.d/docker_daemon.yaml | |
|
||
COPY entrypoint.sh /entrypoint.sh | ||
|
||
ADD config_builder.py /config_builder.py | ||
|
||
# Extra conf.d and checks.d | ||
VOLUME ["/conf.d", "/checks.d"] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.