Skip to content

Commit

Permalink
Update Dockerfile to include git metadata and version changes
Browse files Browse the repository at this point in the history
Added support for passing git repository URL and commit SHA as build arguments to the `Dockerfile`, ensuring these are set as environment variables in the image. Also updated the `DD_VERSION` argument value to a more descriptive identifier.
  • Loading branch information
hanna-eismant committed Dec 13, 2024
1 parent 21b733f commit ef2a718
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion teamcity/app-server.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,17 @@ FROM openjdk:17
COPY --from=datadog/serverless-init:1 /datadog-init /app/datadog-init
ADD 'https://dtdg.co/latest-java-tracer' /dd_tracer/java/dd-java-agent.jar

ARG DD_VERSION=1
ARG DD_VERSION=Aardvark-v0.1

ENV DD_SERVICE=app-server
ENV DD_ENV=prod
ENV DD_VERSION=$DD_VERSION

ARG DD_GIT_REPOSITORY_URL
ARG DD_GIT_COMMIT_SHA
ENV DD_GIT_REPOSITORY_URL=${DD_GIT_REPOSITORY_URL}
ENV DD_GIT_COMMIT_SHA=${DD_GIT_COMMIT_SHA}

EXPOSE 8080

ARG JAR_FILE=app-server/build/libs/app-server.jar
Expand Down

0 comments on commit ef2a718

Please sign in to comment.