I have just installed Ubuntu 20.0 and installed docker using snap. I'm trying to run some different docker images for `hbase` and `rabbitmq` but each time I start an image, it immediately exists with `126` status.

```
$ sudo docker ps -a
CONTAINER ID        IMAGE               COMMAND               CREATED              STATUS                            PORTS               NAMES
4d58720fce3a        dajobe/hbase        "/opt/hbase-server"   5 seconds ago        Exited (126) 4 seconds ago                            hbase-docker
b7a84731a05b        harisekhon/hbase    "/entrypoint.sh"      About a minute ago   Exited (126) 59 seconds ago                           optimistic_goldwasser
294b95ef081a        harisekhon/hbase    "/entrypoint.sh"      About a minute ago   Exited (126) About a minute ago                       goofy_tu

```

I have tried everything and tried to use `docker inspect` on separate images, but nothing gives away, why the containers exit out immediately. Any suggestions?

EDIT
----

When i run the command i run the following

```
$ sudo bash start-hbase.sh

```

It gives the output exactly like it should

```
Starting HBase container
Container has ID 3c3e36e1e0fbc59aa0783a4c7f3cb8690781b2d04e8f842749d629a9c25e0604
Updating /etc/hosts to make hbase-docker point to  (hbase-docker)
Now connect to hbase at localhost on the standard ports
  ZK 2181, Thrift 9090, Master 16000, Region 16020
Or connect to host hbase-docker (in the container) on the same ports

For docker status:
$ id=3c3e36e1e0fbc59aa0783a4c7f3cb8690781b2d04e8f842749d629a9c25e0604
$ docker inspect $id

```

I think the issue might be due to some permissions, because i tried to chck the logs as suggested in the comments, and get this error:

`/bin/bash: /opt/hbase-server: Permission denied`