diff --git a/docker/.env b/docker/.env new file mode 100644 index 00000000..8e947ae8 --- /dev/null +++ b/docker/.env @@ -0,0 +1,2 @@ +REGISTER=ruoyi +TAG=2.4.0 diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml index 0da30320..b7d70a06 100644 --- a/docker/docker-compose.yml +++ b/docker/docker-compose.yml @@ -84,7 +84,8 @@ services: privileged: true restart: always networks: - - ruoyi_net + ruoyi_net: + ipv4_address: 172.30.0.60 networks: ruoyi_net: diff --git a/pom.xml b/pom.xml index 10a35d2c..d71181b1 100644 --- a/pom.xml +++ b/pom.xml @@ -32,6 +32,12 @@ 3.16.0 2.2.1 3.4.0 + + + localhost + http://${docker.registry.url}:2375 + ruoyi + 1.2.0 diff --git a/ruoyi-admin/Dockerfile b/ruoyi-admin/Dockerfile new file mode 100644 index 00000000..a3c4dc14 --- /dev/null +++ b/ruoyi-admin/Dockerfile @@ -0,0 +1,13 @@ +FROM anapsix/alpine-java:8_server-jre_unlimited + +MAINTAINER Lion Li + +RUN mkdir -p /ruoyi/admin + +WORKDIR /ruoyi/admin + +EXPOSE 8080 + +ADD ./target/ruoyi-admin.jar ./app.jar + +ENTRYPOINT ["java", "-Djava.security.egd=file:/dev/./urandom", "-jar", "app.jar"] diff --git a/ruoyi-admin/pom.xml b/ruoyi-admin/pom.xml index f33a5d4c..1855b610 100644 --- a/ruoyi-admin/pom.xml +++ b/ruoyi-admin/pom.xml @@ -24,7 +24,7 @@ true - + mysql mysql-connector-java @@ -82,7 +82,26 @@ false ${project.artifactId} - + + + com.spotify + docker-maven-plugin + ${docker.plugin.version} + + ${docker.namespace}/${project.artifactId}:${project.version} + ${project.basedir} + ${docker.registry.host} + ${docker.registry.url} + ${docker.registry.url} + + + / + ${project.build.directory} + ${project.build.finalName}.jar + + + +