From 329a323d71318de1bac220e7043ae12b8bbcf883 Mon Sep 17 00:00:00 2001 From: k-tamura Date: Fri, 25 Nov 2022 16:51:05 +0900 Subject: [PATCH] Add Dockerfile --- Dockerfile | 9 +++++++++ README.jp.md | 9 +++++++++ README.md | 10 ++++++++++ pom.xml | 5 ----- 4 files changed, 28 insertions(+), 5 deletions(-) create mode 100644 Dockerfile diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..2d4280e --- /dev/null +++ b/Dockerfile @@ -0,0 +1,9 @@ +FROM maven:3.8-jdk-8 as builder +COPY . /usr/src/easybuggy4sb/ +WORKDIR /usr/src/easybuggy4sb/ +RUN mvn -B package + +FROM openjdk:8-slim +WORKDIR /opt/easybuggy4sb +COPY --from=builder /usr/src/easybuggy4sb/target/ROOT.war . +CMD ["java", "-XX:MaxMetaspaceSize=128m", "-Xloggc:logs/gc_%p_%t.log", "-XX:NativeMemoryTracking=summary", "-Xmx256m", "-XX:MaxDirectMemorySize=90m", "-XX:+UseSerialGC", "-XX:+PrintHeapAtGC", "-XX:+PrintGCDetails", "-XX:+PrintGCDateStamps", "-XX:+UseGCLogFileRotation", "-XX:NumberOfGCLogFiles=5", "-XX:GCLogFileSize=10M", "-XX:GCTimeLimit=15", "-XX:GCHeapFreeLimit=50", "-XX:+HeapDumpOnOutOfMemoryError", "-XX:HeapDumpPath=logs/", "-XX:ErrorFile=logs/hs_err_pid%p.log", "-agentlib:jdwp=transport=dt_socket,server=y,address=9009,suspend=n", "-Dderby.stream.error.file=logs/derby.log", "-Dderby.infolog.append=true", "-Dderby.language.logStatementText=true", "-Dderby.locks.deadlockTrace=true", "-Dderby.locks.monitor=true", "-Dderby.storage.rowLocking=true", "-Dcom.sun.management.jmxremote", "-Dcom.sun.management.jmxremote.port=7900", "-Dcom.sun.management.jmxremote.ssl=false", "-Dcom.sun.management.jmxremote.authenticate=false", "-ea", "-jar", "ROOT.war"] diff --git a/README.jp.md b/README.jp.md index b39ef68..90109e6 100644 --- a/README.jp.md +++ b/README.jp.md @@ -20,7 +20,16 @@ EasyBuggy Bootは、Spring Bootで開発されたEasyBuggyのクローンです http://localhost:8080 +:clock4: クイックスタート (Docker) +- + + $ docker build . -t easybuggy4sb # コンテナイメージのビルド + $ docker run -p 8080:8080 easybuggy4sb # EasyBuggyの起動 +Access to + + http://localhost:8080 + 停止するには:  CTRL+Cをクリック diff --git a/README.md b/README.md index ed41a02..5736746 100644 --- a/README.md +++ b/README.md @@ -15,6 +15,16 @@ This is a clone of EasyBuggy built on Spring Boot. [EasyBuggy](https://github.co ( or ``` java -jar ROOT.war ``` or deploy ROOT.war on your servlet container with [the JVM options](https://github.com/k-tamura/easybuggy4sb/blob/master/pom.xml#L148). ) +Access to + + http://localhost:8080 + +:clock4: Quick Start (Docker) +- + + $ docker build . -t easybuggy4sb # Build container image + $ docker run -p 8080:8080 easybuggy4sb # Start easybuggy + Access to http://localhost:8080 diff --git a/pom.xml b/pom.xml index eaac6ed..bb55514 100644 --- a/pom.xml +++ b/pom.xml @@ -136,11 +136,6 @@ org.slf4j slf4j-api - - org.slf4j - slf4j-log4j12 - - org.owasp.esapi esapi