1. FROM openjdk:8u212-b04-jdk-stretch
    2. VOLUME /tmp
    3. ADD myapp.jar app.jar
    4. RUN sh -c 'touch /app.jar'
    5. CMD ["java", "-Xms256m", "-Xmx256m", "-jar", "app.jar"]

    构建

    1. docker build -t app .

    运行

    1. docker run -p 18608:18608 --name myname -t app