How to run jar file using docker file in docker container

后端 未结 3 1056
鱼传尺愫
鱼传尺愫 2021-01-24 06:08

I write the docker file for run the jar file and it does not create the log file for see the console below is my docker file

From ubuntu 
RUN apt-get update &         


        
3条回答
  •  清歌不尽
    2021-01-24 06:49

    To just run myapp.jar in docker (e.g. to avoid installing java on the host) you can just run:

    docker run -v `pwd`:/mnt java:8 java -jar /mnt/myapp.jar
    

提交回复
热议问题