Dcoker container not running after building the image and running the container

I am trying to build a docker image to be used to deploy jasperreports-server on my k8s cluster.

The image has been built successfully. When I run this command (docker images) I can clearly see the image.

When I do => docker run -d -p 8080:8080 jasperreports-server:7.8.0 this runs the image and start the container.

When I execute => docker ps I do not see any running container.

When I execute => docker ps -a I see containers but with an exit status and I can not access the jasperreports-server via localhost:8080

With the image available can I go ahead and use the it in my values.yml file to be applied in my k8s cluster? I intend to use helm to deploy the jasperreports-server.

BUT I would like to first make sure the container is running.

Here is the content of my dockerfile:


Official jre as base Image built by Eclipse Temurin.

FROM eclipse-temurin:21-jre-alpine

Set environment variables for JasperReports Server


ENV JRS_HOME=/opt/jasperreports-server


ENV JRS_USER=jasperadmin

ENV JRS_PASSWORD=jasperadmin

Create directories for JasperReports Server and license

RUN mkdir -p $JRS_HOME && mkdir -p $JRS_LICENSE_DIR

Copy JasperReports Server installer to the image

COPY jasperreports-server-$JRS_VERSION-bin.zip $JRS_HOME/

Install necessary packages and unzip JasperReports Server

RUN apk add --no-cache unzip bash && \

unzip $JRS_HOME/jasperreports-server-$JRS_VERSION-bin.zip -d $JRS_HOME && \

rm $JRS_HOME/jasperreports-server-$JRS_VERSION-bin.zip

Copy the JasperReports Server license file to the image

COPY jasperserver.license $JRS_LICENSE_DIR/

Set working directory


Expose the necessary ports


Start JasperReports Server

CMD [“sh”, “-c”, “$JRS_HOME/jasperreports-server-cp-$JRS_VERSION-bin/install.sh && catalina.sh run”]

Here is a section of the container when i inspected it.

"Args": [
    "State": {
        "Status": "exited",
        "Running": false,
        "Paused": false,
        "Restarting": false,
        "OOMKilled": false,
        "Dead": false,
        "Pid": 0,
        "ExitCode": 1,
        "Error": "",
        "StartedAt": "2024-07-09T10:03:16.368106091Z",
        "FinishedAt": "2024-07-09T10:03:16.673567909Z"

Am I doing something wrong?

Please, format your post according to the following guide: How to format your forum posts
In short: please, use </> button to share codes, terminal outputs, error messages or anything that can contain special characters which would be interpreted by the MarkDown filter. Use the preview feature to make sure your text is formatted as you would expect it and check your post after you have sent it so you can still fix it.

Example code block:

    image: image1