Skip to content

Commit

Permalink
update dockerfile
Browse files Browse the repository at this point in the history
  • Loading branch information
48n6e@gmail.com committed Oct 15, 2024
1 parent c1ee941 commit 468cc93
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ services:

camellia_proxy_rw:
container_name: camellia_proxy_rw
image: 48n6e/camellia-redis-proxy:1.2.29-jdk-8-0.0.1
image: 48n6e/camellia-redis-proxy:1.2.30-jdk-22-0.0.1
volumes:
- "./application.yml:/opt/camellia-redis-proxy/BOOT-INF/classes/application.yml"
- "./resource-table.json:/opt/camellia-redis-proxy/BOOT-INF/classes/resource-table.json"
command: ["java","-XX:+UseG1GC","-XX:+UseContainerSupport","-Xms128m","-Xmx2048m","-server","org.springframework.boot.loader.JarLauncher"]
command: ["java", "-XX:+UseG1GC","-Dio.netty.tryReflectionSetAccessible=true","--add-opens","java.base/java.lang=ALL-UNNAMED","--add-opens","java.base/java.io=ALL-UNNAMED","--add-opens","java.base/java.math=ALL-UNNAMED","--add-opens","java.base/java.net=ALL-UNNAMED","--add-opens","java.base/java.nio=ALL-UNNAMED","--add-opens","java.base/java.security=ALL-UNNAMED","--add-opens","java.base/java.text=ALL-UNNAMED","--add-opens","java.base/java.time=ALL-UNNAMED","--add-opens","java.base/java.util=ALL-UNNAMED","--add-opens","java.base/jdk.internal.access=ALL-UNNAMED","--add-opens","java.base/jdk.internal.misc=ALL-UNNAMED","--add-opens","java.base/sun.net.util=ALL-UNNAMED","-XX:+UseContainerSupport", "-Xms128m","-Xmx4096m","-server","org.springframework.boot.loader.JarLauncher"]
23 changes: 23 additions & 0 deletions docs/camellia-redis-proxy/deploy/docker/Dockerfile-jdk22
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM openjdk:22-jdk-slim

WORKDIR /opt/camellia-redis-proxy

ARG CamelliaVersion

ENV CamelliaVersion=$CamelliaVersion

RUN wget https://github.com/netease-im/camellia/releases/download/${CamelliaVersion}/camellia-redis-proxy-${CamelliaVersion}.tar.gz -O /tmp/camellia-redis-proxy.tar.gz

RUN mkdir -p /opt/camellia-redis-proxy \
&& tar -xzvf /tmp/camellia-redis-proxy.tar.gz -C /opt/camellia-redis-proxy --strip-components=1 \
&& rm /tmp/camellia-redis-proxy.tar.gz

RUN apt update -y && apt install net-tools vim bc jq redis-tools curl procps -y

ADD https://github.com/krallin/tini/releases/download/v0.19.0/tini-amd64 /usr/local/bin/tini

RUN chmod +x /usr/local/bin/tini

ENTRYPOINT ["/usr/local/bin/tini", "--"]

CMD ["java", "-XX:+UseG1GC","-Dio.netty.tryReflectionSetAccessible=true","--add-opens","java.base/java.lang=ALL-UNNAMED","--add-opens","java.base/java.io=ALL-UNNAMED","--add-opens","java.base/java.math=ALL-UNNAMED","--add-opens","java.base/java.net=ALL-UNNAMED","--add-opens","java.base/java.nio=ALL-UNNAMED","--add-opens","java.base/java.security=ALL-UNNAMED","--add-opens","java.base/java.text=ALL-UNNAMED","--add-opens","java.base/java.time=ALL-UNNAMED","--add-opens","java.base/java.util=ALL-UNNAMED","--add-opens","java.base/jdk.internal.access=ALL-UNNAMED","--add-opens","java.base/jdk.internal.misc=ALL-UNNAMED","--add-opens","java.base/sun.net.util=ALL-UNNAMED","-XX:+UseContainerSupport", "-Xms128m","-Xmx4096m","-server","org.springframework.boot.loader.JarLauncher"]
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ spec:
enableServiceLinks: false
containers:
- name: container-camellia
image: 48n6e/camellia-redis-proxy:1.2.29-jdk-22-0.0.1
image: 48n6e/camellia-redis-proxy:1.2.30-jdk-22-0.0.1
command:
- java
- "-XX:+UseG1GC"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ spec:
enableServiceLinks: false
containers:
- name: container-camellia
image: 48n6e/camellia-redis-proxy:1.2.29-jdk-22-0.0.1
image: 48n6e/camellia-redis-proxy:1.2.30-jdk-22-0.0.1
command:
- java
- "-XX:+UseG1GC"
Expand Down

0 comments on commit 468cc93

Please sign in to comment.