How to make a jar package into a docker image

WJ
Release: 2020-06-08 17:03:03
Original
4426 people have browsed it

How to make a jar package into a docker image

How to make a jar package into a docker image?

1. Write the Dockerfile file

FROM java:8
ADD SPRINGCLOUD.jar app.jar
RUN bash -c ‘touch /app.jar’
ENTRYPOINT ["-java","-jar","/app.jar"]
Copy after login

java:8 Existing java version number

SPRINGCLOUD.jar jar package name

2. Place the jar package and the Dockerfile in the same file

3. Execute sudo docker build -t="center" .

4. Center is the name used to generate the image. Remember **.* *

Don’t miss it. Center is the name used to generate the image. Remember. Don’t miss it.

How to make a jar package into a docker image

If the picture above appears, it means the image has been generated successfully

The above is the detailed content of How to make a jar package into a docker image. For more information, please follow other related articles on the PHP Chinese website!

Related labels:
source:php.cn
Statement of this Website
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
About us Disclaimer Sitemap
php.cn:Public welfare online PHP training,Help PHP learners grow quickly!