Skip to content

Docker container hangs when starting Tomcat #42

@nscott

Description

@nscott

I attempted to follow the guides and it was pretty simple to get the container downloaded. Running it appeared to succeed, but nothing ever worked when curling it.

After a long investigation, it turns out that running java -version on the container always hangs.

I swapped the base image to tomcat:9-jre8-temurin-jammy (https://snyk.io/test/docker/tomcat%3A9-jre8-temurin-jammy) and was able to get the server started.

Separately, the base image being used appears to also have several critical vulnerabilities, and high vulnerabilities specifically targeting the JDK being used: https://snyk.io/test/docker/tomcat%3A9-jre8-alpine

There were a few other things I had to mess with to get it to start, but I haven't done any verification on the image besides asking it for it's version (which was successful).

Here's a link to my commit: nscott@30da197

I'm not sure if there are further implications to moving off of Alpine for your Docker image, or if there's any desire for a full Docker compilation file, so I didn't open that as a PR. It also messes with some logging locations by default, and I would assume that's backwards-incompatible.

My environment is an M1 Mac running OSX Monterey 12.5, and I was previously testing this with 12.4.

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type
No fields configured for issues without a type.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions