added Dockerfile, preparing for distribution
Signed-off-by: Stephan Richter <s.richter@srsoftware.de>
This commit is contained in:
23
Dockerfile
Normal file
23
Dockerfile
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
FROM alpine AS build
|
||||||
|
RUN apk update \
|
||||||
|
&& apk add openjdk21-jre
|
||||||
|
RUN apk add bash clang-extra-tools git
|
||||||
|
ADD . /OpenCloudCal
|
||||||
|
WORKDIR /OpenCloudCal
|
||||||
|
RUN VERSION=$(clang-format --version | sed -e "s/.* //g") \
|
||||||
|
&& sed -i "s|clangFormat(.*).style|clangFormat(\"$VERSION\").style|g" build.gradle.kts \
|
||||||
|
&& ./gradlew jar
|
||||||
|
RUN mv *app/build/distributions/*.zip /occ.zip
|
||||||
|
|
||||||
|
FROM alpine
|
||||||
|
RUN apk update \
|
||||||
|
&& apk add openjdk21-jre
|
||||||
|
COPY --from=build /occ.zip /opt/occ.zip
|
||||||
|
RUN cd /opt && unzip occ.zip && ls -al
|
||||||
|
RUN adduser -S occ \
|
||||||
|
&& mkdir /data /home/occ/.config \
|
||||||
|
&& chown occ /data /home/occ/.config \
|
||||||
|
&& ln -s /data /home/occ/.config
|
||||||
|
|
||||||
|
USER occ
|
||||||
|
ENTRYPOINT java -jar /opt/lightoidc.jar
|
||||||
@@ -1,5 +1,9 @@
|
|||||||
description = "OpenCloudCal : Application"
|
description = "OpenCloudCal : Application"
|
||||||
|
|
||||||
|
plugins {
|
||||||
|
application
|
||||||
|
}
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation(project(":de.srsoftware.cal.api"))
|
implementation(project(":de.srsoftware.cal.api"))
|
||||||
implementation(project(":de.srsoftware.cal.base"))
|
implementation(project(":de.srsoftware.cal.base"))
|
||||||
@@ -11,10 +15,14 @@ dependencies {
|
|||||||
implementation("de.srsoftware:configuration.json:1.0.0")
|
implementation("de.srsoftware:configuration.json:1.0.0")
|
||||||
|
|
||||||
implementation("de.srsoftware:tools.http:1.2.2")
|
implementation("de.srsoftware:tools.http:1.2.2")
|
||||||
implementation("de.srsoftware:tools.logging:1.0.5")
|
implementation("de.srsoftware:tools.logging:1.2.0")
|
||||||
implementation("de.srsoftware:tools.plugin:1.0.1")
|
implementation("de.srsoftware:tools.plugin:1.0.1")
|
||||||
implementation("de.srsoftware:tools.util:1.3.0")
|
implementation("de.srsoftware:tools.util:1.3.0")
|
||||||
implementation("de.srsoftware:tools.web:1.3.14")
|
implementation("de.srsoftware:tools.web:1.3.14")
|
||||||
implementation("com.mysql:mysql-connector-j:9.1.0")
|
implementation("com.mysql:mysql-connector-j:9.1.0")
|
||||||
implementation("org.json:json:20240303")
|
implementation("org.json:json:20240303")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
application{
|
||||||
|
mainClass = "de.srsoftware.cal.app.Application"
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user