docker run运行jar包,无法生成文件

saul 2019-06-28 11:18:00
public class App
{
public static void createNewFile(String fileName) {
        File f=new File(fileName); 
        try {
        f.createNewFile();
  } catch (IOException e) {
   e.printStackTrace();
}
}

 public static void main( String[] args ) throws InterruptedException {
    for(;;) {
    try {
       Thread.sleep(5000);
   } catch (InterruptedException e) {
        e.printStackTrace();
  }
    createNewFile(System.currentTimeMillis()+"");
    System.out.println( "Hello World!" );
    }
    }
}

蝉知2.0