Skip to content

Instantly share code, notes, and snippets.

@eyalkoren
Last active December 17, 2019 04:46
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save eyalkoren/7036f777954ac4f1918b97cffe9bd727 to your computer and use it in GitHub Desktop.
Save eyalkoren/7036f777954ac4f1918b97cffe9bd727 to your computer and use it in GitHub Desktop.
Builds latest Elastic's Java agent and creates an Alpine image with the agent jar at /usr/agent/elastic-apm-agent.jar
FROM alpine:3.9
RUN apk --no-cache add curl
RUN curl -L "http://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=co.elastic.apm&a=elastic-apm-agent&v=LATEST" -o elastic-apm-agent.jar
FROM alpine:3.9
RUN mkdir /usr/agent
COPY --from=0 elastic-apm-agent.jar /usr/agent
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment