mirror of
https://github.com/ReaJason/MemShellParty.git
synced 2026-09-25 16:31:53 +08:00
feat: suitable for xxl-job < 2.2.0 #151
This commit is contained in:
@@ -0,0 +1,23 @@
|
||||
FROM maven:3.9.9-eclipse-temurin-8 AS builder
|
||||
|
||||
RUN set -ex \
|
||||
&& cd /usr/src \
|
||||
&& git clone --depth 1 -b 2.1.2 https://github.com/xuxueli/xxl-job.git . \
|
||||
&& cd xxl-job-executor-samples/xxl-job-executor-sample-springboot \
|
||||
&& sed -i 's|xxl\.job\.admin\.addresses=.*|xxl.job.admin.addresses=http://admin:8080/xxl-job-admin|g' src/main/resources/application.properties \
|
||||
&& sed -i 's|xxl\.job\.executor\.logpath=.*|xxl.job.executor.logpath=/var/log/xxl-job|g' src/main/resources/application.properties \
|
||||
&& mvn clean package -DskipTests
|
||||
|
||||
FROM eclipse-temurin:8-jdk
|
||||
|
||||
RUN set -ex \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends wait-for-it \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY --from=builder /usr/src/xxl-job-executor-samples/xxl-job-executor-sample-springboot/target/xxl-job-executor-sample-springboot-2.1.2.jar /usr/src/xxl-job-executor-sample-springboot-2.1.2.jar
|
||||
COPY docker-entrypoint.sh /docker-entrypoint.sh
|
||||
|
||||
WORKDIR /usr/src
|
||||
ENTRYPOINT ["/docker-entrypoint.sh"]
|
||||
CMD ["java", "-jar", "/usr/src/xxl-job-executor-sample-springboot-2.1.2.jar"]
|
||||
@@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -ex
|
||||
|
||||
wait-for-it -t 0 admin:8080
|
||||
|
||||
exec "$@"
|
||||
Reference in New Issue
Block a user