diff --git a/Dockerfile b/Dockerfile index b47b7f8cf262b4e6804f0eab5f761a10c525255c..0e59829fa73aa0b81c468852d7b93d2274299bae 100644 --- a/Dockerfile +++ b/Dockerfile @@ -2,12 +2,13 @@ ARG BASE_REGISTRY=registry1.dso.mil ARG BASE_IMAGE=ironbank/redhat/openjdk/openjdk17 ARG BASE_TAG=1.17 -FROM registry1.dso.mil/ironbank/opensource/maven/maven-openjdk-17:3.8.5-openjdk-17 as base +FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} as base USER 0 # Copy and extract ELRR Aggregator source code COPY elrraggregator-1.1.tar.gz . +# ELRR Aggregator Dependencies RUN tar -xvf ./elrraggregator-1.1.tar.gz --strip-components=1 && \ mkdir -p target/dependency && \ cd elrraggregator-0.0.1-SNAPSHOT && \ @@ -15,7 +16,7 @@ RUN tar -xvf ./elrraggregator-1.1.tar.gz --strip-components=1 && \ mv META-INF/ ../target/dependency/ && \ mv org/ ../target/dependency/ - +# Cleaning up unnecessary files RUN dnf update -y && \ dnf install -y java-devel && \ dnf clean all && \ @@ -24,11 +25,12 @@ RUN dnf update -y && \ FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} as runner USER 0 -#COPY --from=base /usr/lib/jvm/openjdk-15/ /usr/lib/jvm/openjdk-15/ -COPY --from=base /home/maven/target/dependency/BOOT-INF/lib /app/lib -COPY --from=base /home/maven/target/dependency/META-INF /app/META-INF -COPY --from=base /home/maven/target/dependency/BOOT-INF/classes /app +# Copying dependencies from base +COPY --from=base ./target/dependency/BOOT-INF/lib /app/lib +COPY --from=base ./target/dependency/META-INF /app/META-INF +COPY --from=base ./target/dependency/BOOT-INF/classes /app +# Cleaning up unnecessary files RUN dnf update -y && \ dnf install -y java-devel && \ dnf clean all && \ diff --git a/hardening_manifest.yaml b/hardening_manifest.yaml index c5644d8c7f0a6a7158c663c9325fe9d32b3be982..5f97d649783aaa5d4783d116a142b6cdfb63b0c5 100644 --- a/hardening_manifest.yaml +++ b/hardening_manifest.yaml @@ -8,6 +8,7 @@ name: "opensource/adl-initiative/elrr/elrr-aggregator" # The most specific version should be the first tag and will be shown # on ironbank.dsop.io tags: +- "1.0.1" - "1.0.0" - "latest" @@ -18,13 +19,13 @@ args: # Docker image labels labels: - org.opencontainers.image.title: "elrraggregator" + org.opencontainers.image.title: "ELRR aggregator" org.opencontainers.image.description: "Image for Enterprise Learner Record Repository (ELRR) service which aggregates learner profiles" # URL to find more information on the image org.opencontainers.image.licenses: "Oracle Technology Network License" org.opencontainers.image.url: "https://github.com/US-ELRR/elrraggregator" org.opencontainers.image.vendor: "Enterprise Learner Record Repository (ELRR)" - org.opencontainers.image.version: "1.0.0" + org.opencontainers.image.version: "1.0.1" mil.dso.ironbank.image.keywords: "elrr, aggregator, elrraggregator, enterprise learner record repository" # Product the image belongs to for grouping multiple images mil.dso.ironbank.product.name: "Enterprise Learner Record Repository (ELRR)"