forked from ArcadeData/arcadedb
-
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.
Merge pull request #2 from raft-tech/1374-arcadedb-keycloak
add new multi stage docker images at project root with additional run…
- Loading branch information
Showing
2 changed files
with
154 additions
and
0 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,74 @@ | ||
# | ||
# Copyright © 2021-present Arcade Data Ltd ([email protected]) | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
|
||
FROM maven:3.8.3-eclipse-temurin-11 as build | ||
COPY . ./ | ||
RUN mvn clean install -DskipTests | ||
|
||
FROM eclipse-temurin:11 | ||
LABEL maintainer="Arcade Data LTD ([email protected])" | ||
|
||
ENV JAVA_OPTS=" " | ||
|
||
ENV JAVA_OPTS_SCRIPT="--add-opens java.base/java.io=ALL-UNNAMED -Dpolyglot.engine.WarnInterpreterOnly=false -Djna.nosys=true -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF8" | ||
|
||
ENV ARCADEDB_OPTS_MEMORY="-Xms2G -Xmx2G" | ||
|
||
ENV ARCADEDB_JMX="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.rmi.port=9998" | ||
|
||
RUN useradd -ms /bin/bash arcadedb -u 1234 | ||
RUN groupadd arcadedb -f -g 1234 | ||
RUN usermod -a -G arcadedb arcadedb | ||
|
||
WORKDIR /home/arcadedb | ||
|
||
USER arcadedb | ||
|
||
COPY --from=build --chown=arcadedb:arcadedb ./package/target/arcadedb-*/arcadedb-* ./ | ||
|
||
RUN chmod +x ./bin/*.sh | ||
|
||
# Volumes available | ||
VOLUME [ "/home/arcadedb/databases"] | ||
|
||
VOLUME [ "/home/arcadedb/log"] | ||
|
||
VOLUME [ "/home/arcadedb/config"] | ||
|
||
# ArcadeDB HTTP API & STUDIO | ||
EXPOSE 2480 | ||
|
||
# ArcadeDB Binary Protocol (replication) | ||
EXPOSE 2424 | ||
|
||
# Gremlin Server (Apache TinkerPop) | ||
EXPOSE 8182 | ||
|
||
# Postgres protocol | ||
EXPOSE 5432 | ||
|
||
# Redis protocol | ||
EXPOSE 6379 | ||
|
||
# MongoDB Protocol | ||
EXPOSE 27017 | ||
|
||
# JMX for monitoring | ||
EXPOSE 9999 | ||
EXPOSE 9998 | ||
|
||
CMD ["./bin/server.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,80 @@ | ||
# | ||
# Copyright © 2021-present Arcade Data Ltd ([email protected]) | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
# | ||
|
||
#-------------------------------------------------------------------------------------------------------------- | ||
# USE THIS FROM THE COMMAND LINE (FROM MAVEN IS STILL NOT SUPPORTED BUILDX TO GENERATE MULTIPLE ARCHITECTURES) | ||
#-------------------------------------------------------------------------------------------------------------- | ||
# $> cd package | ||
# $> docker buildx build --platform linux/amd64,linux/arm64 --push -t arcadedata/arcadedb -f src/main/docker/Dockerfile-multi ./target/arcadedb-23.3.1-SNAPSHOT.dir/ | ||
#-------------------------------------------------------------------------------------------------------------- | ||
|
||
FROM maven:3.8.3-eclipse-temurin-11 as build | ||
COPY . . | ||
RUN mvn clean install -DskipTests | ||
|
||
FROM eclipse-temurin:11 | ||
LABEL maintainer="Arcade Data LTD ([email protected])" | ||
|
||
ENV JAVA_OPTS=" " | ||
|
||
ENV JAVA_OPTS_SCRIPT="--add-opens java.base/java.io=ALL-UNNAMED -Dpolyglot.engine.WarnInterpreterOnly=false -Djna.nosys=true -XX:+HeapDumpOnOutOfMemoryError -Djava.awt.headless=true -Dfile.encoding=UTF8" | ||
|
||
ENV ARCADEDB_OPTS_MEMORY="-Xms2G -Xmx2G" | ||
|
||
ENV ARCADEDB_JMX="-Dcom.sun.management.jmxremote=true -Dcom.sun.management.jmxremote.local.only=false -Dcom.sun.management.jmxremote.authenticate=false -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.port=9999 -Dcom.sun.management.jmxremote.rmi.port=9998" | ||
|
||
RUN useradd -ms /bin/bash arcadedb -u 1234 | ||
RUN groupadd arcadedb -f -g 1234 | ||
RUN usermod -a -G arcadedb arcadedb | ||
|
||
WORKDIR /home/arcadedb | ||
|
||
USER arcadedb | ||
|
||
COPY --from=build --chown=arcadedb:arcadedb ./package/target/arcadedb-*/arcadedb-* ./ | ||
|
||
RUN chmod +x ./bin/*.sh | ||
|
||
# Volumes available | ||
VOLUME [ "/home/arcadedb/databases"] | ||
|
||
VOLUME [ "/home/arcadedb/log"] | ||
|
||
VOLUME [ "/home/arcadedb/config"] | ||
|
||
# ArcadeDB HTTP API & STUDIO | ||
EXPOSE 2480 | ||
|
||
# ArcadeDB Binary Protocol (replication) | ||
EXPOSE 2424 | ||
|
||
# Gremlin Server (Apache TinkerPop) | ||
EXPOSE 8182 | ||
|
||
# Postgres protocol | ||
EXPOSE 5432 | ||
|
||
# Redis protocol | ||
EXPOSE 6379 | ||
|
||
# MongoDB Protocol | ||
EXPOSE 27017 | ||
|
||
# JMX for monitoring | ||
EXPOSE 9999 | ||
EXPOSE 9998 | ||
|
||
CMD ["./bin/server.sh"] |