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:
INSTRUCTION arguments
Official jre as base Image built by Eclipse Temurin.
FROM eclipse-temurin:21-jre-alpine
Set environment variables for JasperReports Server
ENV JRS_VERSION=7.8.0
ENV JRS_HOME=/opt/jasperreports-server
ENV JRS_LICENSE_DIR=$JRS_HOME/license
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
WORKDIR $JRS_HOME
Expose the necessary ports
EXPOSE 8080
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": [
"node",
"app.js"
],
"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?
