I wondered what to do to containerize a little legacy thing, and when I tried it with reference to the following site, I stumbled on some, so make a note.
https://qiita.com/MahoTakara/items/1f2d160aeb129eec50ce#kuberntes%E3%81%A7%E3%81%AE%E5%8B%95%E4%BD%9C%E3%83%86%E3%82%B9%E3%83%88
(I'm really sorry for posting because it's a memo writing level. I learned a lot. I won't ask you to request editing!)
Things that people who are new to Docker tend to make mistakes
--If the target PC is used with VPN, an error will occur at minikube start and it will not start. When I used the Start command during a VPN connection with my Cisco Anyconnect, it failed to start with an error. --After running Libert in Eclipse or testing with Docker CE, if you do not drop Liberty as appropriate, it is difficult to analyze the cause because the site is running even though it should have been stopped, or it is not reflected even though it was corrected. To do. That's why amateurs are ... (self-deprecation). The docker stop command stops Docker.
Of the programs, ViewSessionObject.java seems to be slimy if param1 is not included, so I wrote a code to avoid nullpo with Try-catch. It's sloppy.
ViewSessionObject.java
response.setContentType("text/plain; charset=UTF-8");
PrintWriter out = response.getWriter();
InetAddress ia = InetAddress.getLocalHost();
out.println("Host Name = " + ia.getHostName());
out.println("IPaddr = " + ia.getHostAddress());
try {
HttpSession session = request.getSession();
SessionObject so = (SessionObject)session.getAttribute("param1");
out.println("param1 = " + so.getParam1());
}catch(Exception e) {
out.println("param1 = " + "null data");
}
//response.getWriter().append("Served at: ").append(request.getContextPath());
But I don't know how Liberty in Docker can tell if it's all loaded.
What are you guys doing when you test? .. I don't believe it's a shame to wait somehow. ..
Recommended Posts