Quickly host a Java 8 JAR package using Docker
app.jar Into The Directory(The Pkg Must Be Named app.jar)-v To Mount The Directory Into /app In The Containerdocker run -it --name container-name --restart always -p 8080:8080 -v /path/to/dir:/app -d jimkku/app-java8:latest
I hava created a directory named /home/jimkku/example,and I uploaded the app.jar,and the run the following cmd:
docker run -it --name example-app --restart always -p 8080:8080 -v /home/jimkku/example:/app -d jimkku/app-java8:latest
Content type
Image
Digest
sha256:f81f34baf…
Size
235.9 MB
Last updated
about 1 year ago
docker pull jimkku/app-java8