Deploying React + Springboot app in docker stopped with status code 143

Hi,
I was working with React + spring boot app, and Everything working fine locally.
But when I try to deploy my docker image, It stops with

WARN stopped: java (exit status 143).

Dockerfile

# Stage 1: Setup Nginx and Node.js
FROM nginx:alpine

# Update package repository and install required packages
RUN apk update && \
    apk add --no-cache openjdk17 supervisor

# Set the working directory for the application
WORKDIR /app

# Copy build files to nginx directory
COPY /url_exct_frontend/build /usr/share/nginx/html

# Copy jar file to app directory
COPY target/*.jar app.jar

# Allow executable permissions to the jar file
RUN chmod +x app.jar

# Copy supervisord configuration file
COPY supervisord.conf /etc/supervisord.conf

# Expose port 80
EXPOSE 80 8080

# Start supervisord to manage Java application and Nginx server
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisord.conf"]

Hi Sushant,

Java services often require more memory than is available on the free instance type. I’d suggest trying this out with a paid instance type.

This would also give you access to metrics so you could confirm and have some visibility into your memory and CPU consumption.

Keep in mind that you’re only billed for the minutes your service runs as a paid instance type, so you could perform this experiment for just a few cents as long as you remember to downgrade back to free if the paid instance type doesn’t help.

Regards,

Matt

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.