"catalina.sh": executable file not found in $PATH: unknown

Hello, I am getting an error when running this command:

docker run -d -p 20080:80 --link cddbbackend:cddbbackend --name cddbfrontend frontend:v2

And i get this error:

docker: Error response from daemon: OCI runtime create failed: container_linux.go:367: starting container process caused: exec: "catalina.sh": executable file not found in $PATH: unknown.

I made an image from my Dockerfile. The image is called ‘frontend:v2’ as you can see in the command. I want to basically create a new container called cddbfrontend, which links to my, already running, Java backend container called cddbbackend. Basically an NGINX reverse proxy.

This is my Dockerfile for building the image frontend:v2:

FROM nginx:alpine
COPY frontend/src /usr/share/nginx/html
COPY frontend/resources/nginx.conf /etc/nginx

ENTRYPOINT ["catalina.sh", "run"]

Ive tried removing the ENTRYPOINT, but when i run the docker run command without the ENTRYPOINT in the Dockerfile, the cddbfrontend container’s port suddenly disappears, or is not running when i run command docker ps. I access it in the webbrowser with localhost:20080 but it tells me it can’t connect to it. What am I doing wrong?

With the ENTYPOINT instruction, you simply introduced a new unrelated problem, which takes place earlier than the “real” problem happens. Hint: you are calling a bash script, that is typicaly found in a tomcat based base image, but does not exist in any other base image…

I assume the ENTYPOINT inherited by the base image starts nginx.
Educated guess: nginx does not like something in your nginx.conf, which makes the container fail to start.

Make sure to check the logs of the “dead” containers to get an isight, why it’s dying.

This is what my nginx.conf file looks like

worker_processes 1;

events { worker_connections 1024; }

http {
    include  mime.types;
    index    index.html index.htm index.php;
    sendfile on;

    gzip              on;
    gzip_http_version 1.0;
    gzip_proxied      any;
    gzip_min_length   500;
    gzip_disable      "MSIE [1-6]\.";
    gzip_types        text/plain text/xml text/css
                      text/comma-separated-values
                      text/javascript
                      application/x-javascript
                      application/atom+xml;

    # List of application servers
    upstream backend {
        server cddb_backend:8080;
    }

    # Configuration for the server
    server {

        # Running port
        listen 80;

        root   /usr/share/nginx/html;
        access_log  /var/log/nginx/localhost.access.log;

        # Proxying the connections connections
        location /cddb {
            proxy_pass         http://backend;
            proxy_redirect     off;
            proxy_set_header   Host $host;
            proxy_set_header   X-Real-IP $remote_addr;
            proxy_set_header   X-Forwarded-For $proxy_add_x_forwarded_for;
            proxy_set_header   X-Forwarded-Host $server_name;

        }
    }
}

what could be going wrong here?

Never mind i figured out i had to rename my backend container to ‘cddb_backend’ instead of ‘cddbbackend’ as stated in the nginx.conf file. Thanks for your help :slight_smile:

Glad you found the issue!