Commit ffb5e9fe authored by MANISH KUMAR's avatar MANISH KUMAR
Browse files

Using base java hardened container

parent ce749969
Pipeline #38442 passed with stage
in 8 seconds
...@@ -146,24 +146,13 @@ azure_containerize: ...@@ -146,24 +146,13 @@ azure_containerize:
script: script:
# Dockerfile # Dockerfile
- | - |
echo 'FROM openjdk:8-jdk-alpine echo 'FROM community.opengroup.org:5555/osdu/platform/deployment-and-operations/base-containers-azure/alpine-zulu8:0.0.2
VOLUME /tmp VOLUME /tmp
ARG JAR_FILE ARG JAR_FILE
ARG APPLICATIONINSIGHTS_INSTRUMENTATION_KEY ARG APPLICATIONINSIGHTS_INSTRUMENTATION_KEY
RUN apk add --update \
curl
# Application Insights Agent
ARG AGENT_VERSION=3.0.2
RUN mkdir -p /opt/agents \
&& chmod g+rwx /opt/agents \
&& curl -i -k -L https://github.com/microsoft/ApplicationInsights-Java/releases/download/${AGENT_VERSION}/applicationinsights-agent-${AGENT_VERSION}.jar -o /opt/agents/applicationinsights-agent.jar \
&& chmod 444 /opt/agents/applicationinsights-agent.jar
COPY ${JAR_FILE} app.jar COPY ${JAR_FILE} app.jar
ENV APPLICATIONINSIGHTS_CONNECTION_STRING=${APPLICATIONINSIGHTS_INSTRUMENTATION_KEY} ENV APPLICATIONINSIGHTS_CONNECTION_STRING=${APPLICATIONINSIGHTS_INSTRUMENTATION_KEY}
ENTRYPOINT ["java","-javaagent:/opt/agents/applicationinsights-agent.jar","-jar","/app.jar"]' > Dockerfile ENTRYPOINT ["java","-javaagent:/opt/agents/applicationinsights-agent.jar","-jar","/home/osdu/app.jar"]' > Dockerfile
- | - |
if [ "$AZURE_SERVICE" == "entitlements" ]; then if [ "$AZURE_SERVICE" == "entitlements" ]; then
TARGET=$(find ./$AZURE_BUILD_SUBDIR/target -name '*.jar' |head -n 1) TARGET=$(find ./$AZURE_BUILD_SUBDIR/target -name '*.jar' |head -n 1)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment