UNCLASSIFIED
Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Open sidebar
Ironbank Containers
G
Galvanize
galvanize
java-code-evaluator
Commits
c676e22e
Commit
c676e22e
authored
Apr 16, 2021
by
Michael Uranaka
Browse files
updating docker file
parent
412b0821
Pipeline
#223469
passed with stages
in 10 minutes and 18 seconds
Changes
2
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
25 deletions
+23
-25
.gitignore
.gitignore
+3
-1
Dockerfile
Dockerfile
+20
-24
No files found.
.gitignore
View file @
c676e22e
...
@@ -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
Dockerfile
View file @
c676e22e
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
# Pre
build, 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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment