-
Notifications
You must be signed in to change notification settings - Fork 192
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Migrate image base to alpine #83
Conversation
c1fc3ff
to
b1f8107
Compare
b1f8107
to
f4eb6c3
Compare
Conflicts: Dockerfile entrypoint.sh
@@ -1,46 +1,55 @@ | |||
FROM debian:jessie | |||
FROM alpine:3.3 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
alpine 3.4 is already out
COPY conf.d/docker_daemon.yaml "$DD_HOME/agent/conf.d/docker_daemon.yaml" | ||
|
||
# Add install and config files | ||
ADD https://raw.githubusercontent.com/DataDog/dd-agent/5.8.0/packaging/datadog-agent/source/setup_agent.sh /setup_agent.sh |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the agent version is hardcoded in the url. switch to env var:
ADD https://raw.githubusercontent.com/DataDog/dd-agent/$AGENT_VERSION/packaging/datadog-agent/source/setup_agent.sh /setup_agent.sh
thanks for the review @oryband :) let's do it |
Btw, the image size was reduced from ~150MB to ~50MB which is 60% less, not 10%! Very nice! https://hub.docker.com/r/datadog/docker-dd-agent/tags/ Related to #75 |
Why this PR?
Basing the Datadog Agent image on Alpine0 would reduce its size and harden its security by default.
This PR adds an alpine directory to offer an alpine-based image on top of the debian-based one.
How it works
Starting from the
alpine:3.4
base image, the image installs agent dependencies using Alpine's package managerapk
.It then installs the agent from the source using https://github.com/DataDog/dd-agent/blob/5.8.0/packaging/datadog-agent/source/setup_agent.sh