Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
N
nshmp-ws-static
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
ghsc
National Seismic Hazard Model Project
nshmp-ws-static
Commits
bda211db
Commit
bda211db
authored
5 years ago
by
Clayton, Brandon Scott
Browse files
Options
Downloads
Patches
Plain Diff
add Dockerfile
parent
a8f01580
No related branches found
Branches containing commit
No related tags found
Tags containing commit
1 merge request
!6
Micronaut Service
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+65
-0
65 additions, 0 deletions
Dockerfile
with
65 additions
and
0 deletions
Dockerfile
0 → 100644
+
65
−
0
View file @
bda211db
# Current project
ARG
project=nshmp-netcdf
# Builder work dir
ARG
builder_workdir=/app/${project}
# Path to libs dir
ARG
libs_dir=${builder_workdir}/build/libs
# Path to jar file
ARG
jar_file=${libs_dir}/${project}.jar
####
# Build war file
####
FROM
usgs/centos:8
as
builder
ENV
LANG="en_US.UTF-8"
ARG
builder_workdir
ARG
libs_dir
ARG
jar_file
WORKDIR
${builder_workdir}
RUN
yum
install
-y
java-11-openjdk which git
COPY
. .
RUN
mv
nshmp-lib ../.
\
&&
./gradlew
--no-daemon
assemble
\
&&
mv
${
libs_dir
}
/
*
-all
.jar
${
jar_file
}
####
# Run service
####
FROM
usgs/centos:8
ENV
LANG "en_US.UTF-8"
ENV
NSHM_GROUP "NSHM_CONUS_2018"
ENV
CONTEXT_PATH "/nshmp/static"
ENV
MN_CONTEXT_PATH "-Dmicronaut.server.context-path=${CONTEXT_PATH}"
ENV
NETCDF "/app/nshm.nc"
ARG
jar_file
ARG
project
WORKDIR
/app
COPY
--from=builder ${jar_file} /app/${project}.jar
COPY
--from=builder /app/faults /app/faults
RUN
yum
install
-y
java-11-openjdk-headless
EXPOSE
8080
ENTRYPOINT
[ \
"/usr/bin/java", \
${MN_CONTEXT_PATH}, \
"-jar", \
"nshmp-ws.jar", \
"-nshm-group=${NSHM_GROUP}", \
"-netcdf=${NETCDF}" ]
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment