Skip to content

Commit

Permalink
Update Dockerfile
Browse files Browse the repository at this point in the history
update to use contrast image copy and remove standalone appname.
  • Loading branch information
marklacasse authored Jun 8, 2023
1 parent 574f909 commit ba4d117
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,11 @@ WORKDIR /spring-petclinic
#Add application
ADD ./spring-petclinic-1.5.1.jar /spring-petclinic/spring-petclinic-1.5.1.jar

#Add Contrast
ADD https://repository.sonatype.org/service/local/artifact/maven/redirect?r=central-proxy&g=com.contrastsecurity&a=contrast-agent&v=LATEST /opt/contrast/contrast.jar
# Copy the required agent files from the official Contrast agent image.
COPY --from=contrast/agent-java:latest /contrast/contrast-agent.jar /opt/contrast/contrast.jar

#Enable Contrast
ENV JAVA_TOOL_OPTIONS='-javaagent:/opt/contrast/contrast.jar -Dcontrast.application.name=spring-petclinic'
ENV JAVA_TOOL_OPTIONS='-javaagent:/opt/contrast/contrast.jar'

EXPOSE 8080
ENTRYPOINT ["java", "-jar", "spring-petclinic-1.5.1.jar"]
ENTRYPOINT ["java", "-jar", "spring-petclinic-1.5.1.jar"]

0 comments on commit ba4d117

Please sign in to comment.