forked from eugenp/tutorials
-
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.
BAEL-1614 - Docker with Java Guest Post (eugenp#4474)
* BAEL-1614 - additions for docker * BAEL-1614 - move docker project to guest module
- Loading branch information
1 parent
b59da11
commit 272f018
Showing
6 changed files
with
52 additions
and
3 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 |
---|---|---|
@@ -1,3 +1,2 @@ | ||
Manifest-Version: 1.0 | ||
Class-Path: | ||
|
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,16 @@ | ||
# Alpine Linux with OpenJDK JRE | ||
FROM openjdk:8-jre-alpine | ||
RUN apk add --no-cache bash | ||
|
||
# copy fat WAR | ||
COPY spring-boot-app-0.0.1-SNAPSHOT.war /app.war | ||
|
||
# copy fat WAR | ||
COPY logback.xml /logback.xml | ||
|
||
COPY run.sh /run.sh | ||
|
||
# runs application | ||
#CMD ["/usr/bin/java", "-jar", "-Dspring.profiles.active=default", "-Dlogging.config=/logback.xml", "/app.war"] | ||
|
||
ENTRYPOINT ["/run.sh"] |
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,15 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<configuration> | ||
<include resource="org/springframework/boot/logging/logback/base.xml"/> | ||
<appender name="FILE" class="ch.qos.logback.core.FileAppender"> | ||
<file>/var/log/Application/application.log</file> | ||
<append>true</append> | ||
<encoder> | ||
<pattern>%-7d{yyyy-MM-dd HH:mm:ss:SSS} %m%n</pattern> | ||
</encoder> | ||
</appender> | ||
|
||
<root level="INFO"> | ||
<appender-ref ref="FILE" /> | ||
</root> | ||
</configuration> |
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,4 @@ | ||
#!/bin/sh | ||
|
||
java -Dspring.profiles.active=$1 -Dlogging.config=/logback.xml -jar /app.war | ||
|
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