UNCLASSIFIED - NO CUI

Skip to content
Snippets Groups Projects
Unverified Commit 0d1bea40 authored by Simeranjeet Sandhu's avatar Simeranjeet Sandhu
Browse files

Cleaning up Dockerfile

parent 482850dc
No related branches found
No related tags found
2 merge requests!22Master,!21elrr-agg-code-commit to development
Pipeline #1174775 failed
......@@ -6,39 +6,19 @@ ARG DEPENDENCY=target/dependency
FROM registry1.dso.mil/ironbank/opensource/maven/maven-openjdk-17:3.8.5-openjdk-17 as base
USER 0
RUN pwd && \
ls -al
RUN echo ">>>>>>>>COPYING AGGREGATOR PACKAGED SOURCE CODE<<<<<<<<<"
# Copy and extract ELRR Aggregator source code
COPY elrraggregator-1.1.tar.gz .
RUN pwd && \
echo ">>>>>>>>EXTRACTING AGGREGATOR SOURCE CODE<<<<<<<<<" && \
tar -xvf ./elrraggregator-1.1.tar.gz --strip-components=1 && \
echo ">>>>>>>>LISTING ROOT DIR CONTENTS<<<<<<<<<" && \
ls -al &&\
echo ">>>>>>>>CREATING target/dependency DIR<<<<<<<<<" && \
RUN tar -xvf ./elrraggregator-1.1.tar.gz --strip-components=1 && \
mkdir -p target/dependency && \
ls -al
RUN echo ">>>>>>>>COPYING DEPS<<<<<<<<<" && \
echo "changing to elrraggregator-0.0.1-SNAPSHOT directory" && \
cd elrraggregator-0.0.1-SNAPSHOT && \
echo "listing contents of elrraggregator-0.0.1-SNAPSHOT directory" && \
ls -al && \
echo "moving elrraggregator-0.0.1-SNAPSHOT contents to target/dep" && \
mv BOOT-INF/ ../target/dependency/ && \
mv META-INF/ ../target/dependency/ && \
mv org/ ../target/dependency/ && \
echo "changing to target/dep DIR" && \
cd ../target/dependency && \
pwd && \
echo "listing contents of target/dep dir" && \
ls -al
#RUN dnf update -y && \
# dnf install -y java-devel && \
# dnf clean all && \
# rm -rf /var/cache/dnf
RUN dnf update -y && \
dnf install -y java-devel && \
dnf clean all && \
rm -rf /var/cache/dnf
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} as runner
......@@ -47,10 +27,10 @@ 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
#RUN dnf update -y && \
# dnf install -y java-devel && \
# dnf clean all && \
# rm -rf /var/cache/dnf
RUN dnf update -y && \
dnf install -y java-devel && \
dnf clean all && \
rm -rf /var/cache/dnf
USER 1001
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment