From 67ca974b71628794185553cf5a8f3e3394c4fa8e Mon Sep 17 00:00:00 2001 From: Ahoo Wang Date: Wed, 2 Jun 2021 20:26:49 +0800 Subject: [PATCH] 1. fix the bug that the historical version configuration is overwritten when the new configuration is recreated after deleting the configuration. 2. optimize the readability of lua scripts 3. optimize Default Jvm Args of Deployment(Kubernetes) --- README.md | 32 +++++++++--------- README.zh-CN.md | 32 +++++++++--------- .../src/main/resources/config_remove.lua | 19 +++++------ .../src/main/resources/config_rollback.lua | 27 +++++++-------- .../src/main/resources/config_set.lua | 33 +++++++++++-------- cosky-mirror/build.gradle.kts | 7 +++- cosky-rest-api/build.gradle.kts | 7 +++- gradle.properties | 2 +- k8s/deployment/cosky-mirror.yml | 6 ++-- k8s/deployment/cosky-rest-api.yml | 6 ++-- k8s/docker/cosky-mirror/Dockerfile | 6 ++-- k8s/docker/rest-api-local/Dockerfile | 6 ++-- k8s/docker/rest-api/Dockerfile | 6 ++-- 13 files changed, 103 insertions(+), 86 deletions(-) diff --git a/README.md b/README.md index 70ed0740..05dde4c0 100644 --- a/README.md +++ b/README.md @@ -35,7 +35,7 @@ between process cache and Redis. > Kotlin DSL ``` kotlin - val coskyVersion = "1.1.2"; + val coskyVersion = "1.1.3"; implementation("me.ahoo.cosky:spring-cloud-starter-cosky-config:${coskyVersion}") implementation("me.ahoo.cosky:spring-cloud-starter-cosky-discovery:${coskyVersion}") ``` @@ -52,7 +52,7 @@ between process cache and Redis. 4.0.0 demo - 1.1.2 + 1.1.3 @@ -96,30 +96,30 @@ logging: #### Option 1:Download the executable file -> Download [cosky-rest-api-server](https://github.com/Ahoo-Wang/cosky/releases/download/1.1.2/cosky-rest-api-1.1.2.tar) +> Download [cosky-rest-api-server](https://github.com/Ahoo-Wang/cosky/releases/download/1.1.3/cosky-rest-api-1.1.3.tar) -> tar *cosky-rest-api-1.1.2.tar* +> tar *cosky-rest-api-1.1.3.tar* ```shell -cd cosky-rest-api-1.1.2 -# Working directory: cosky-rest-api-1.1.2 +cd cosky-rest-api-1.1.3 +# Working directory: cosky-rest-api-1.1.3 bin/cosky-rest-api --server.port=8080 --cosky.redis.uri=redis://localhost:6379 ``` #### Option 2:Run On Docker ```shell -docker pull ahoowang/cosky-rest-api:1.1.2 -docker run --name cosky-rest-api -d -p 8080:8080 --link redis -e COSKY_REDIS_URI=redis://redis:6379 ahoowang/cosky-rest-api:1.1.2 +docker pull ahoowang/cosky-rest-api:1.1.3 +docker run --name cosky-rest-api -d -p 8080:8080 --link redis -e COSKY_REDIS_URI=redis://redis:6379 ahoowang/cosky-rest-api:1.1.3 ``` ##### MacBook Pro (M1) -> Please use *ahoowang/cosky-rest-api:1.1.2-armv7* +> Please use *ahoowang/cosky-rest-api:1.1.3-armv7* ```shell -docker pull ahoowang/cosky-rest-api:1.1.2-armv7 -docker run --name cosky-rest-api -d -p 8080:8080 --link redis -e COSKY_REDIS_URI=redis://redis:6379 ahoowang/cosky-rest-api:1.1.2-armv7 +docker pull ahoowang/cosky-rest-api:1.1.3-armv7 +docker run --name cosky-rest-api -d -p 8080:8080 --link redis -e COSKY_REDIS_URI=redis://redis:6379 ahoowang/cosky-rest-api:1.1.3-armv7 ``` #### Option 3:Run On Kubernetes @@ -145,7 +145,7 @@ spec: value: standalone - name: COSKY_REDIS_URI value: redis://redis-uri:6379 - image: ahoowang/cosky-rest-api:1.1.2 + image: ahoowang/cosky-rest-api:1.1.3 name: cosky-rest-api resources: limits: @@ -276,12 +276,12 @@ spec: ``` shell gradle cosky-config:jmh # or -java -jar cosky-config/build/libs/cosky-config-1.1.2-jmh.jar -bm thrpt -t 25 -wi 1 -rf json -f 1 +java -jar cosky-config/build/libs/cosky-config-1.1.3-jmh.jar -bm thrpt -t 25 -wi 1 -rf json -f 1 ``` ``` # JMH version: 1.29 -# VM version: JDK 11.1.21, OpenJDK 64-Bit Server VM, 11.1.21+9-LTS +# VM version: JDK 11.1.31, OpenJDK 64-Bit Server VM, 11.1.31+9-LTS # VM invoker: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/java # VM options: -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/Users/ahoo/cosky/cosky-config/build/tmp/jmh -Duser.country=CN -Duser.language=zh -Duser.variant # Blackhole mode: full + dont-inline hint @@ -302,12 +302,12 @@ RedisConfigServiceBenchmark.setConfig thrpt 103659.132 ``` shell gradle cosky-discovery:jmh # or -java -jar cosky-discovery/build/libs/cosky-discovery-1.1.2-jmh.jar -bm thrpt -t 25 -wi 1 -rf json -f 1 +java -jar cosky-discovery/build/libs/cosky-discovery-1.1.3-jmh.jar -bm thrpt -t 25 -wi 1 -rf json -f 1 ``` ``` # JMH version: 1.29 -# VM version: JDK 11.1.21, OpenJDK 64-Bit Server VM, 11.1.21+9-LTS +# VM version: JDK 11.1.31, OpenJDK 64-Bit Server VM, 11.1.31+9-LTS # VM invoker: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/java # VM options: -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/Users/ahoo/cosky/cosky-discovery/build/tmp/jmh -Duser.country=CN -Duser.language=zh -Duser.variant # Blackhole mode: full + dont-inline hint diff --git a/README.zh-CN.md b/README.zh-CN.md index 432c2fc8..08f0a7d1 100644 --- a/README.zh-CN.md +++ b/README.zh-CN.md @@ -29,7 +29,7 @@ > Kotlin DSL ``` kotlin - val coskyVersion = "1.1.2"; + val coskyVersion = "1.1.3"; implementation("me.ahoo.cosky:spring-cloud-starter-cosky-config:${coskyVersion}") implementation("me.ahoo.cosky:spring-cloud-starter-cosky-discovery:${coskyVersion}") ``` @@ -46,7 +46,7 @@ 4.0.0 demo - 1.1.2 + 1.1.3 @@ -90,30 +90,30 @@ logging: #### 方式一:下载可执行文件 -> 下载 [rest-api-server](https://github.com/Ahoo-Wang/cosky/releases/download/1.1.2/cosky-rest-api-1.1.2.tar) +> 下载 [rest-api-server](https://github.com/Ahoo-Wang/cosky/releases/download/1.1.3/cosky-rest-api-1.1.3.tar) -> 解压 *cosky-rest-api-1.1.2.tar* +> 解压 *cosky-rest-api-1.1.3.tar* ```shell -cd cosky-rest-api-1.1.2 -# 工作目录: cosky-rest-api-1.1.2 +cd cosky-rest-api-1.1.3 +# 工作目录: cosky-rest-api-1.1.3 bin/cosky-rest-api --server.port=8080 --cosky.redis.uri=redis://localhost:6379 ``` #### 方式二:在 Docker 中运行 ```shell -docker pull ahoowang/cosky-rest-api:1.1.2 -docker run --name cosky-rest-api -d -p 8080:8080 --link redis -e COSKY_REDIS_URI=redis://redis:6379 ahoowang/cosky-rest-api:1.1.2 +docker pull ahoowang/cosky-rest-api:1.1.3 +docker run --name cosky-rest-api -d -p 8080:8080 --link redis -e COSKY_REDIS_URI=redis://redis:6379 ahoowang/cosky-rest-api:1.1.3 ``` ##### MacBook Pro (M1) -> 请使用 *ahoowang/cosky-rest-api:1.1.2-armv7* +> 请使用 *ahoowang/cosky-rest-api:1.1.3-armv7* ```shell -docker pull ahoowang/cosky-rest-api:1.1.2-armv7 -docker run --name cosky-rest-api -d -p 8080:8080 --link redis -e COSKY_REDIS_URI=redis://redis:6379 ahoowang/cosky-rest-api:1.1.2-armv7 +docker pull ahoowang/cosky-rest-api:1.1.3-armv7 +docker run --name cosky-rest-api -d -p 8080:8080 --link redis -e COSKY_REDIS_URI=redis://redis:6379 ahoowang/cosky-rest-api:1.1.3-armv7 ``` #### 方式三:在 Kubernetes 中运行 @@ -139,7 +139,7 @@ spec: value: standalone - name: COSKY_REDIS_URI value: redis://redis-uri:6379 - image: ahoowang/cosky-rest-api:1.1.2 + image: ahoowang/cosky-rest-api:1.1.3 name: cosky-rest-api resources: limits: @@ -270,12 +270,12 @@ spec: ``` shell gradle cosky-config:jmh # or -java -jar cosky-config/build/libs/cosky-config-1.1.2-jmh.jar -bm thrpt -t 25 -wi 1 -rf json -f 1 +java -jar cosky-config/build/libs/cosky-config-1.1.3-jmh.jar -bm thrpt -t 25 -wi 1 -rf json -f 1 ``` ``` # JMH version: 1.29 -# VM version: JDK 11.1.21, OpenJDK 64-Bit Server VM, 11.1.21+9-LTS +# VM version: JDK 11.1.31, OpenJDK 64-Bit Server VM, 11.1.31+9-LTS # VM invoker: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/java # VM options: -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/Users/ahoo/cosky/config/build/tmp/jmh -Duser.country=CN -Duser.language=zh -Duser.variant # Blackhole mode: full + dont-inline hint @@ -296,12 +296,12 @@ RedisConfigServiceBenchmark.setConfig thrpt 103659.132 ``` shell gradle cosky-discovery:jmh # or -java -jar cosky-discovery/build/libs/cosky-discovery-1.1.2-jmh.jar -bm thrpt -t 25 -wi 1 -rf json -f 1 +java -jar cosky-discovery/build/libs/cosky-discovery-1.1.3-jmh.jar -bm thrpt -t 25 -wi 1 -rf json -f 1 ``` ``` # JMH version: 1.29 -# VM version: JDK 11.1.21, OpenJDK 64-Bit Server VM, 11.1.21+9-LTS +# VM version: JDK 11.1.31, OpenJDK 64-Bit Server VM, 11.1.31+9-LTS # VM invoker: /Library/Java/JavaVirtualMachines/zulu-11.jdk/Contents/Home/bin/java # VM options: -Dfile.encoding=UTF-8 -Djava.io.tmpdir=/Users/ahoo/cosky/discovery/build/tmp/jmh -Duser.country=CN -Duser.language=zh -Duser.variant # Blackhole mode: full + dont-inline hint diff --git a/cosky-config/src/main/resources/config_remove.lua b/cosky-config/src/main/resources/config_remove.lua index 81797ea8..5d6b30b4 100644 --- a/cosky-config/src/main/resources/config_remove.lua +++ b/cosky-config/src/main/resources/config_remove.lua @@ -1,11 +1,10 @@ local namespace = KEYS[1]; local configId = ARGV[1]; +local op = 'remove'; local versionField = "version"; - local configIdxKey = namespace .. ":cfg_idx"; local configHistoryIdxKey = namespace .. ":cfg_htr_idx:" .. configId; local configKey = namespace .. ":cfg:" .. configId; - local removed = redis.call("srem", configIdxKey, configKey); if removed == 0 then return 0; @@ -15,18 +14,18 @@ local function getConfigHistoryKey(version) return namespace .. ":cfg_htr:" .. configId .. ":" .. tostring(version); end -local function addHistory(preVersion, configKey) - local configHistoryKey = getConfigHistoryKey(preVersion); - redis.call("zadd", configHistoryIdxKey, preVersion, configHistoryKey); +local function addHistory(currentVersion, configKey, op) + local configHistoryKey = getConfigHistoryKey(currentVersion); + redis.call("zadd", configHistoryIdxKey, currentVersion, configHistoryKey); redis.call("rename", configKey, configHistoryKey); local opTime = redis.call('time')[1]; - return redis.call("hmset", configHistoryKey, "op", "remove", "opTime", opTime); + return redis.call("hmset", configHistoryKey, 'op', op, "opTime", opTime); end -local preVersion = redis.call("hget", configKey, versionField) -if preVersion then - local result = addHistory(preVersion, configKey); - redis.call("publish", configKey, "remove"); +local currentVersion = redis.call("hget", configKey, versionField) +if currentVersion then + local result = addHistory(currentVersion, configKey, op); + redis.call("publish", configKey, op); return result; else return 0; diff --git a/cosky-config/src/main/resources/config_rollback.lua b/cosky-config/src/main/resources/config_rollback.lua index 112de432..a3232de0 100644 --- a/cosky-config/src/main/resources/config_rollback.lua +++ b/cosky-config/src/main/resources/config_rollback.lua @@ -1,6 +1,7 @@ local namespace = KEYS[1]; local configId = ARGV[1]; local targetVersion = ARGV[2]; +local op = 'rollback'; local versionField = "version"; local hashField = "hash"; local configIdxKey = namespace .. ":cfg_idx"; @@ -27,30 +28,30 @@ local function arrayToDictionary(arrayTable) return dicTable; end -local function addHistory(preVersion, configKey) - local configHistoryKey = getConfigHistoryKey(preVersion); - redis.call("zadd", configHistoryIdxKey, preVersion, configHistoryKey); +local function addHistory(currentVersion, configKey, op) + local configHistoryKey = getConfigHistoryKey(currentVersion); + redis.call("zadd", configHistoryIdxKey, currentVersion, configHistoryKey); redis.call("rename", configKey, configHistoryKey); local opTime = redis.call('time')[1]; - return redis.call("hmset", configHistoryKey, "op", "rollback", "opTime", opTime); + return redis.call("hmset", configHistoryKey, 'op', op, "opTime", opTime); end local targetHistoryConfig = arrayToDictionary(targetHistoryConfigArray); -local hash = targetHistoryConfig[hashField]; +local targetHash = targetHistoryConfig[hashField]; -local preHash = redis.call("hget", configKey, hashField) -if (preHash ~= nil) and (preHash == hash) then +local currentHash = redis.call("hget", configKey, hashField) +if (currentHash ~= nil) and (currentHash == targetHash) then return 0; end -redis.call("sadd", configIdxKey, configKey) +redis.call("sadd", configIdxKey, configKey, configKey) -local preVersion = redis.call("hget", configKey, versionField) -local version = preVersion + 1; -addHistory(preVersion, configKey) +local currentVersion = redis.call("hget", configKey, versionField) +local nextVersion = currentVersion + 1; +addHistory(currentVersion, configKey, op) local data = targetHistoryConfig["data"]; local createTime = redis.call('time')[1]; -local result = redis.call("hmset", configKey, "configId", configId, "data", data, "hash", hash, "version", version, "createTime", createTime); -redis.call("publish", configKey, "rollback"); +local result = redis.call("hmset", configKey, "configId", configId, "data", data, hashField, targetHash, versionField, nextVersion, "createTime", createTime); +redis.call("publish", configKey, op); return result; diff --git a/cosky-config/src/main/resources/config_set.lua b/cosky-config/src/main/resources/config_set.lua index 947a7ca2..70d4d355 100644 --- a/cosky-config/src/main/resources/config_set.lua +++ b/cosky-config/src/main/resources/config_set.lua @@ -2,14 +2,15 @@ local namespace = KEYS[1]; local configId = ARGV[1]; local data = ARGV[2]; local hash = ARGV[3]; -local version = 1; +local op = 'set'; +local nextVersion = 1; local versionField = "version"; local hashField = "hash"; local configIdxKey = namespace .. ":cfg_idx"; local configHistoryIdxKey = namespace .. ":cfg_htr_idx:" .. configId; local configKey = namespace .. ":cfg:" .. configId; -local preHash = redis.call("hget", configKey, hashField) -if (preHash ~= nil) and (preHash == hash) then +local currentHash = redis.call("hget", configKey, hashField); +if (currentHash ~= nil) and (currentHash == hash) then return 0; end @@ -17,22 +18,28 @@ local function getConfigHistoryKey(version) return namespace .. ":cfg_htr:" .. configId .. ":" .. tostring(version); end -local function addHistory(preVersion, configKey) - local configHistoryKey = getConfigHistoryKey(preVersion); - redis.call("zadd", configHistoryIdxKey, preVersion, configHistoryKey); +local function addHistory(currentVersion, configKey, op) + local configHistoryKey = getConfigHistoryKey(currentVersion); + redis.call("zadd", configHistoryIdxKey, currentVersion, configHistoryKey); redis.call("rename", configKey, configHistoryKey); local opTime = redis.call('time')[1]; - return redis.call("hmset", configHistoryKey, "op", "set", "opTime", opTime); + return redis.call("hmset", configHistoryKey, 'op', op, "opTime", opTime); end redis.call("sadd", configIdxKey, configKey) -local preVersion = redis.call("hget", configKey, versionField) -if preVersion then - version = preVersion + 1; - addHistory(preVersion, configKey); + +local currentVersion = redis.call("hget", configKey, versionField) +if currentVersion then + nextVersion = currentVersion + 1; + addHistory(currentVersion, configKey, op); +else + local lastHistoryVersion = redis.call('zrevrange', configHistoryIdxKey, 0, 0, 'WITHSCORES') + if #lastHistoryVersion > 0 then + nextVersion = lastHistoryVersion[2] + 1; + end end local createTime = redis.call('time')[1]; -local result = redis.call("hmset", configKey, "configId", configId, "data", data, "hash", hash, "version", version, "createTime", createTime); -redis.call("publish", configKey, "set"); +local result = redis.call("hmset", configKey, "configId", configId, "data", data, hashField, hash, versionField, nextVersion, "createTime", createTime); +redis.call("publish", configKey, op); return result; diff --git a/cosky-mirror/build.gradle.kts b/cosky-mirror/build.gradle.kts index fea4eaa3..a2af7681 100644 --- a/cosky-mirror/build.gradle.kts +++ b/cosky-mirror/build.gradle.kts @@ -18,9 +18,14 @@ application { applicationDefaultJvmArgs = listOf( "-Xms512M", "-Xmx512M", + "-XX:MaxMetaspaceSize=128M", + "-XX:MaxDirectMemorySize=256M", + "-Xss1m", "-server", "-XX:+UseG1GC", - "-Xlog:gc*:file=logs/${applicationName}-gc.log:time,tags:filecount=10,filesize=100M", + "-Xlog:gc*:file=logs/${applicationName}-gc.log:time,tags:filecount=10,filesize=32M", + "-XX:+HeapDumpOnOutOfMemoryError", + "-XX:HeapDumpPath=data", "-Dcom.sun.management.jmxremote", "-Dcom.sun.management.jmxremote.authenticate=false", "-Dcom.sun.management.jmxremote.ssl=false", diff --git a/cosky-rest-api/build.gradle.kts b/cosky-rest-api/build.gradle.kts index f2286bf3..5ae775ef 100644 --- a/cosky-rest-api/build.gradle.kts +++ b/cosky-rest-api/build.gradle.kts @@ -27,9 +27,14 @@ application { applicationDefaultJvmArgs = listOf( "-Xms512M", "-Xmx512M", + "-XX:MaxMetaspaceSize=128M", + "-XX:MaxDirectMemorySize=256M", + "-Xss1m", "-server", "-XX:+UseG1GC", - "-Xlog:gc*:file=logs/${applicationName}-gc.log:time,tags:filecount=10,filesize=100M", + "-Xlog:gc*:file=logs/${applicationName}-gc.log:time,tags:filecount=10,filesize=32M", + "-XX:+HeapDumpOnOutOfMemoryError", + "-XX:HeapDumpPath=data", "-Dcom.sun.management.jmxremote", "-Dcom.sun.management.jmxremote.authenticate=false", "-Dcom.sun.management.jmxremote.ssl=false", diff --git a/gradle.properties b/gradle.properties index c482583f..1a23c77f 100644 --- a/gradle.properties +++ b/gradle.properties @@ -1,5 +1,5 @@ group=me.ahoo.cosky -version=1.1.2 +version=1.1.3 description=CoSky On Redis (Service Discovery and Configuration Service) website=https://github.com/Ahoo-Wang/cosky diff --git a/k8s/deployment/cosky-mirror.yml b/k8s/deployment/cosky-mirror.yml index 99f4da17..527bb16f 100644 --- a/k8s/deployment/cosky-mirror.yml +++ b/k8s/deployment/cosky-mirror.yml @@ -28,15 +28,15 @@ spec: value: nacos - name: SPRING_CLOUD_NACOS_PASSWORD value: nacos-pwd - image: ahoowang/cosky-mirror:1.1.2 + image: ahoowang/cosky-mirror:1.1.3 name: cosky-mirror resources: limits: cpu: "1" - memory: 762Mi + memory: 1280Mi requests: cpu: 250m - memory: 512Mi + memory: 1024Mi volumeMounts: - mountPath: /etc/localtime name: volume-localtime diff --git a/k8s/deployment/cosky-rest-api.yml b/k8s/deployment/cosky-rest-api.yml index 77b305ab..6df8a6ef 100644 --- a/k8s/deployment/cosky-rest-api.yml +++ b/k8s/deployment/cosky-rest-api.yml @@ -20,7 +20,7 @@ spec: value: standalone - name: COSKY_REDIS_URI value: redis://redis-uri:6379 - image: ahoowang/cosky-rest-api:1.1.2 + image: ahoowang/cosky-rest-api:1.1.3 name: cosky-rest-api ports: - containerPort: 8080 @@ -28,10 +28,10 @@ spec: resources: limits: cpu: "1" - memory: 762Mi + memory: 1280Mi requests: cpu: 250m - memory: 512Mi + memory: 1024Mi volumeMounts: - mountPath: /etc/localtime name: volume-localtime diff --git a/k8s/docker/cosky-mirror/Dockerfile b/k8s/docker/cosky-mirror/Dockerfile index 48c18186..d96c5a65 100644 --- a/k8s/docker/cosky-mirror/Dockerfile +++ b/k8s/docker/cosky-mirror/Dockerfile @@ -1,8 +1,8 @@ -# docker buildx build --push --platform linux/arm/v7 --build-arg COSKY_VERSION=1.1.2 --build-arg JDK_VERSION=armv7l-centos-jdk-11.0.11_9-slim -t ahoowang/cosky-mirror:1.1.2-armv7 . -# docker buildx build --push --platform linux/amd64,linux/arm64 --build-arg COSKY_VERSION=1.1.2 --build-arg JDK_VERSION=jdk11u-centos-nightly-slim -t ahoowang/cosky-mirror:1.1.2 . +# docker buildx build --push --platform linux/arm/v7 --build-arg COSKY_VERSION=1.1.3 --build-arg JDK_VERSION=armv7l-centos-jdk-11.0.11_9-slim -t ahoowang/cosky-mirror:1.1.3-armv7 . +# docker buildx build --push --platform linux/amd64,linux/arm64 --build-arg COSKY_VERSION=1.1.3 --build-arg JDK_VERSION=jdk11u-centos-nightly-slim -t ahoowang/cosky-mirror:1.1.3 . ARG JDK_VERSION=jdk11u-centos-nightly-slim -ARG COSKY_VERSION=1.1.2 +ARG COSKY_VERSION=1.1.3 ARG COSKY_HOME=/cosky FROM adoptopenjdk/openjdk11:${JDK_VERSION} AS base diff --git a/k8s/docker/rest-api-local/Dockerfile b/k8s/docker/rest-api-local/Dockerfile index 195c9b60..cf06b34b 100644 --- a/k8s/docker/rest-api-local/Dockerfile +++ b/k8s/docker/rest-api-local/Dockerfile @@ -1,8 +1,8 @@ -# docker buildx build --push --platform linux/arm/v7 --build-arg COSKY_VERSION=1.1.2 --build-arg JDK_VERSION=armv7l-centos-jdk-11.0.11_9-slim -t ahoowang/cosky-rest-api:1.1.2-armv7 . -# docker buildx build --push --platform linux/amd64,linux/arm64 --build-arg COSKY_VERSION=1.1.2 --build-arg JDK_VERSION=jdk11u-centos-nightly-slim -t ahoowang/cosky-rest-api:1.1.2 . +# docker buildx build --push --platform linux/arm/v7 --build-arg COSKY_VERSION=1.1.3 --build-arg JDK_VERSION=armv7l-centos-jdk-11.0.11_9-slim -t ahoowang/cosky-rest-api:1.1.3-armv7 . +# docker buildx build --push --platform linux/amd64,linux/arm64 --build-arg COSKY_VERSION=1.1.3 --build-arg JDK_VERSION=jdk11u-centos-nightly-slim -t ahoowang/cosky-rest-api:1.1.3 . ARG JDK_VERSION=jdk11u-centos-nightly-slim -ARG COSKY_VERSION=1.1.2 +ARG COSKY_VERSION=1.1.3 ARG COSKY_HOME=/cosky FROM adoptopenjdk/openjdk11:${JDK_VERSION} AS base diff --git a/k8s/docker/rest-api/Dockerfile b/k8s/docker/rest-api/Dockerfile index bb5d60c4..4842b61c 100644 --- a/k8s/docker/rest-api/Dockerfile +++ b/k8s/docker/rest-api/Dockerfile @@ -1,8 +1,8 @@ -# docker buildx build --push --platform linux/arm/v7 --build-arg COSKY_VERSION=1.1.2 --build-arg JDK_VERSION=armv7l-centos-jdk-11.1.21_9-slim -t ahoowang/cosky-rest-api:1.1.2-armv7 . -# docker buildx build --push --platform linux/amd64,linux/arm64 --build-arg COSKY_VERSION=1.1.2 --build-arg JDK_VERSION=jdk11u-centos-nightly-slim -t ahoowang/cosky-rest-api:1.1.2 . +# docker buildx build --push --platform linux/arm/v7 --build-arg COSKY_VERSION=1.1.3 --build-arg JDK_VERSION=armv7l-centos-jdk-11.1.31_9-slim -t ahoowang/cosky-rest-api:1.1.3-armv7 . +# docker buildx build --push --platform linux/amd64,linux/arm64 --build-arg COSKY_VERSION=1.1.3 --build-arg JDK_VERSION=jdk11u-centos-nightly-slim -t ahoowang/cosky-rest-api:1.1.3 . ARG JDK_VERSION=jdk11u-centos-nightly-slim -ARG COSKY_VERSION=1.1.2 +ARG COSKY_VERSION=1.1.3 ARG COSKY_HOME=/cosky FROM adoptopenjdk/openjdk11:${JDK_VERSION} AS base