R
R
Reversaidx2018-09-05 19:56:10
Java
Reversaidx, 2018-09-05 19:56:10

Creating a Docker container?

Hello everyone, I'm a system administrator, there was a task to dockerize an application (the application is written in java), I did not expect that there would be problems with this.
The essence of the problem:
Now the java application is running under tomcat, I expected that if I take a war file and run java -jar <*.war> everything will take off without pain, but an error occurs that I don’t understand
Error: Could not find or load main class
Can you explain where to dig?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
Sergey Gornostaev, 2018-09-05
@sergey-gornostaev

Doesn't it bother you that the key is called jar, and the file extension is war? war files must be run by the web container.

A
aol-nnov, 2018-09-05
@aol-nnov

FROM tomcat:8.0.20-jre8
COPY ./my-app-1.0-SNAPSHOT.war /usr/local/tomcat/webapps/myapp.war

build, run. what problems?! :)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question