-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
7 changed files
with
62 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
FROM docker-registry.htrc.indiana.edu/tomcat9 | ||
|
||
MAINTAINER Data to Insight Center <d2i@indiana.edu> | ||
|
||
# tomcat9 sets USER to tomcat, and WORKDIR to /opt/tomcat | ||
|
||
USER root | ||
|
||
# environment variables | ||
ENV ARTIFACT_ID=rights-api | ||
ENV TOMCAT_DIR=/opt/tomcat | ||
|
||
# identity-helper.war should exist in the dir containing this | ||
# Dockerfile | ||
ADD target/$ARTIFACT_ID*.war $TOMCAT_DIR/webapps/$ARTIFACT_ID.war | ||
|
||
RUN unzip -qq $TOMCAT_DIR/webapps/$ARTIFACT_ID.war -d $TOMCAT_DIR/webapps/$ARTIFACT_ID | ||
|
||
RUN chown -R tomcat $TOMCAT_DIR/webapps/ | ||
RUN chmod 755 $TOMCAT_DIR/logs/ | ||
|
||
|
||
USER tomcat |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/usr/bin/env bash | ||
|
||
if [ "$#" -eq 0 ]; then | ||
echo "No arguments supplied." | ||
echo "Usage: bash docker-build.sh dockerImageTag" | ||
echo "dockerImageTag - The image tag for the docker-registry.htrc.indiana.edu/rights-api image name" | ||
echo "Examples: bash docker-build.sh dev" | ||
exit 1 | ||
fi | ||
|
||
mvn clean install | ||
|
||
docker build --no-cache -t docker-registry.htrc.indiana.edu/rights-api:$1 . | ||
docker push docker-registry.htrc.indiana.edu/rights-api:$1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters