Skip to content
GitLab
Explore
Sign in
Register
Primary navigation
Search or go to…
Project
V
VIPSLogic
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Container registry
Model registry
Operate
Environments
Monitor
Incidents
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
VIPS
VIPSLogic
Commits
9c805e17
Commit
9c805e17
authored
4 years ago
by
Tor-Einar Skog
Browse files
Options
Downloads
Patches
Plain Diff
First commit
parent
576ce601
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
Dockerfile
+67
-0
67 additions, 0 deletions
Dockerfile
with
67 additions
and
0 deletions
Dockerfile
0 → 100644
+
67
−
0
View file @
9c805e17
# the first stage of our build will use a maven 3.6 parent image
FROM
maven:3.6-openjdk-11
AS
MAVEN_BUILD
# copy the pom and src code to the container
COPY
./ ./
# package our application code
RUN
mvn clean
install
# Used this as a template: https://github.com/jboss-dockerfiles/wildfly/blob/master/Dockerfile
# Use latest jboss/base-jdk:11 image as the base
FROM
jboss/base-jdk:11
# Set the WILDFLY_VERSION env variable
ENV
WILDFLY_VERSION 20.0.0.Final
ENV
WILDFLY_SHA1 3cab3453c9270c662766417adf16c27806124361
ENV
JBOSS_HOME /opt/jboss/wildfly
USER
root
# Add the WildFly distribution to /opt, and make wildfly the owner of the extracted tar content
# Make sure the distribution is available from a well-known place
RUN
cd
$HOME
\
&&
curl
-O
https://download.jboss.org/wildfly/
$WILDFLY_VERSION
/wildfly-
$WILDFLY_VERSION
.tar.gz
\
&&
sha1sum
wildfly-
$WILDFLY_VERSION
.tar.gz |
grep
$WILDFLY_SHA1
\
&&
tar
xf wildfly-
$WILDFLY_VERSION
.tar.gz
\
&&
mv
$HOME
/wildfly-
$WILDFLY_VERSION
$JBOSS_HOME
\
&&
rm
wildfly-
$WILDFLY_VERSION
.tar.gz
\
&&
chown
-R
jboss:0
${
JBOSS_HOME
}
\
&&
chmod
-R
g+rw
${
JBOSS_HOME
}
# copy only the artifacts we need from the first stage and discard the rest
COPY
--from=MAVEN_BUILD /target/VIPSLogic-1.0-SNAPSHOT.war /VIPSLogic-1.0-SNAPSHOT.war
# Use the sample wildfly_config/standalone.xml, add the correct configs, and copy to the parent folder of the
# VIPSLogic source folder
COPY
../standalone.xml ${JBOSS_HOME}/standalone/configuration/standalone.xml
#TODO Download and install the required modules
# PostgreSQL and PostGIS jdbc drivers
RUN
mkdir
-p
${
JBOSS_HOME
}
/modules/org/postgresql/main
RUN
echo
'<?xml version="1.0" encoding="UTF-8"?>
\
<module xmlns="urn:jboss:module:1.0" name="org.postgresql">
\
<resources>
\
<resource-root path="postgresql-42.2.18.jar"/>
\
<resource-root path="postgis-jdbc-2.1.0.jar"/>
\
</resources>
\
<dependencies>
\
<module name="javax.api"/>
\
<module name="javax.transaction.api"/>
\
</dependencies>
\
</module>'
>
${
JBOSS_HOME
}
/modules/org/postgresql/module.xml
RUN
ln
-s
/VIPSLogic-1.0-SNAPSHOT.war
${
JBOSS_HOME
}
/standalone/deployments/VIPSLogic-1.0-SNAPSHOT.war
# Ensure signals are forwarded to the JVM process correctly for graceful shutdown
ENV
LAUNCH_JBOSS_IN_BACKGROUND true
USER
jboss
# Expose the ports we're interested in
EXPOSE
8080
# Set the default command to run on boot
# This will boot WildFly in the standalone mode and bind to all interface
CMD
["/opt/jboss/wildfly/bin/standalone.sh", "-b", "0.0.0.0"]
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