Skip to content
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

Merged
merged 6 commits into from
Jun 27, 2016
Merged

Migrate image base to alpine #83

merged 6 commits into from
Jun 27, 2016

Conversation

hkaj
Copy link
Member

@hkaj hkaj commented Apr 15, 2016

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 manager apk.
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

@hkaj hkaj force-pushed the haissam/alpine-opt branch 2 times, most recently from c1fc3ff to b1f8107 Compare April 27, 2016 12:14
@@ -1,46 +1,55 @@
FROM debian:jessie
FROM alpine:3.3
Copy link

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
Copy link

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

@oryband
Copy link

oryband commented Jun 26, 2016

@hkaj
Copy link
Member Author

hkaj commented Jun 27, 2016

thanks for the review @oryband :) let's do it

@hkaj hkaj merged commit 5344bda into master Jun 27, 2016
@oryband
Copy link

oryband commented Jun 27, 2016

Awesome!

@oryband
Copy link

oryband commented Jun 27, 2016

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants