Browse Source

docker configure!

chl 2 years ago
parent
commit
3b8ff02650
3 changed files with 15 additions and 0 deletions
  1. 4 0
      docker/Dockerfile
  2. 10 0
      docker/docker-compose.yml
  3. 1 0
      pom.xml

+ 4 - 0
docker/Dockerfile

@@ -0,0 +1,4 @@
+FROM daocloud.io/library/java:8u40-jdk
+COPY mytest.jar /usr/local
+WORKDIR /usr/local
+CMD java -jar mytest.jar

+ 10 - 0
docker/docker-compose.yml

@@ -0,0 +1,10 @@
+version: '3.1'
+services:
+  mytest:
+    build:
+      context: ./
+      dockerfile: Dockerfile
+    image: mytest:v1.0.0
+    container_name: mytest
+    ports:
+      - 8080:8080

+ 1 - 0
pom.xml

@@ -30,6 +30,7 @@
     </dependencies>
 
     <build>
+        <finalName>mytest</finalName>
         <plugins>
             <plugin>
                 <groupId>org.springframework.boot</groupId>