diff --git a/1-basic/dubbo-samples-api/Dockerfile b/1-basic/dubbo-samples-api/Dockerfile new file mode 100644 index 0000000000..aed987fe2f --- /dev/null +++ b/1-basic/dubbo-samples-api/Dockerfile @@ -0,0 +1,27 @@ +# Licensed to the Apache Software Foundation (ASF) under one +# or more contributor license agreements. See the NOTICE file +# distributed with this work for additional information +# regarding copyright ownership. The ASF licenses this file +# to you 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.9.9 as builder + +ADD . /code +WORKDIR /code +RUN mvn clean package -B -DskipTests + +FROM openjdk:21-jdk + +COPY --from=builder /code/target/app-jar-with-dependencies.jar /app/app.jar +EXPOSE 50052 +ENTRYPOINT exec java -jar /app/app.jar diff --git a/1-basic/dubbo-samples-api/pom.xml b/1-basic/dubbo-samples-api/pom.xml index 0680b87462..0936dc0f03 100644 --- a/1-basic/dubbo-samples-api/pom.xml +++ b/1-basic/dubbo-samples-api/pom.xml @@ -40,8 +40,7 @@ 17 UTF-8 - 3.3.1 - 2.20.0 + 3.3.2 5.9.2 @@ -52,29 +51,11 @@ ${dubbo.version} - + - org.slf4j - slf4j-api - 1.7.30 - - - - org.apache.logging.log4j - log4j-slf4j-impl - ${log4j2.version} - - - - org.apache.logging.log4j - log4j-core - ${log4j2.version} - - - - org.apache.logging.log4j - log4j-api - ${log4j2.version} + ch.qos.logback + logback-classic + 1.5.15 @@ -98,6 +79,7 @@ + app org.apache.maven.plugins @@ -108,6 +90,28 @@ + + maven-assembly-plugin + + + jar-with-dependencies + + + + org.apache.dubbo.samples.provider.Application + + + + + + make-assembly + package + + single + + + + diff --git a/1-basic/dubbo-samples-api/src/main/resources/log4j2.xml b/1-basic/dubbo-samples-api/src/main/resources/log4j2.xml deleted file mode 100644 index 69e1321d22..0000000000 --- a/1-basic/dubbo-samples-api/src/main/resources/log4j2.xml +++ /dev/null @@ -1,29 +0,0 @@ - - - - - - - - - - - - - -