UNCLASSIFIED

Commit c676e22e authored by Michael Uranaka's avatar Michael Uranaka
Browse files

updating docker file

parent 412b0821
Pipeline #223469 passed with stages
in 10 minutes and 18 seconds
...@@ -10,4 +10,6 @@ gradlew ...@@ -10,4 +10,6 @@ gradlew
gradlew.bat gradlew.bat
gradle gradle
build_dependencies build_dependencies
libs libs
\ No newline at end of file jars.tar.gz
redis-cli.tar.gz
\ No newline at end of file
ARG BASE_REGISTRY=registry1.dso.mil ARG BASE_REGISTRY=registry1.dso.mil
ARG BASE_IMAGE=opensource/gradle/gradle-jre11 ARG BASE_IMAGE=ironbank/opensource/gradle/gradle-jre11
ARG BASE_TAG=6.7.1 ARG BASE_TAG=6.7.1
FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG} FROM ${BASE_REGISTRY}/${BASE_IMAGE}:${BASE_TAG}
...@@ -9,39 +9,35 @@ USER 0 ...@@ -9,39 +9,35 @@ USER 0
RUN dnf update -y && dnf clean all RUN dnf update -y && dnf clean all
# Copy in the project files # Copy in the project files
WORKDIR /app COPY ./scripts \
COPY ./scripts /app redis-cli.tar.gz \
COPY redis-cli.tar.gz . jars.tar.gz /app/
COPY jars.tar.gz .
# Set workdir. # Set workdir.
WORKDIR /app WORKDIR /app
# Setup redis. # Setup redis and jar files.
RUN tar xzf redis-cli.tar.gz && rm redis-cli.tar.gz RUN tar xzf redis-cli.tar.gz \
RUN mv redis-cli /usr/local/bin/redis-cli && rm redis-cli.tar.gz \
&& mv redis-cli /usr/local/bin/redis-cli \
# Setup jars. && tar xzf jars.tar.gz && rm jars.tar.gz \
RUN tar xzf jars.tar.gz && rm jars.tar.gz && mkdir libs && mv jars/main/* libs/ \
RUN mkdir libs && mv jars/main/* libs/ && mkdir process_job/libs && mv jars/process_job/* process_job/libs/ \
RUN mkdir process_job/libs && mv jars/process_job/* process_job/libs/ && mkdir send_results/libs && mv jars/send_results/* send_results/libs/ \
RUN mkdir send_results/libs && mv jars/send_results/* send_results/libs/ && rm -rf jars \
RUN rm -rf jars && chown -R 1000 /app \
&& chmod 0555 /app/get-job.sh
# Set permissions and ownership
RUN chown -R 1000 /app
RUN chmod 0555 /app/get-job.sh
# Change to the gradle user # Change to the gradle user
USER 1000 USER 1000
# Prebuild, then build. This should speed things up before processing the first job # Pre-build. This should speed things up before processing the first job
RUN gradle --offline build RUN gradle --offline build \
RUN cd process_job && gradle --offline build && cd .. && cd process_job && gradle --offline build && cd .. \
RUN cd send_results && gradle --offline build && cd .. && cd send_results && gradle --offline build && cd ..
# Health check # Health check
HEALTHCHECK none HEALTHCHECK none
# Start the job processor # Start the job processor
ENTRYPOINT ["/app/get-job.sh"] ENTRYPOINT ["/app/get-job.sh"]
\ No newline at end of file
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