I have a cassandra container started on which I overwrite the cassandra.yaml file with the updated property:

```
authenticator: PasswordAuthenticator

```

instead 

```
authenticator: AllowAllAuthenticator

```

This will allow me to create new superuser on the new instance.

Now, after this instance, I create a new image named cassandra-new which has the new cassandra.yaml file. So when I start it, it will allow me to create a new role for may cassandra db.

The problem is that I must manually go inside the instance:

```
docker exec -it cassandra-new /bin/bash

```

Then I have to manually type in:

```
cqlsh -u cassandra -p cassandra

```

And then I can write my script:

```
CREATE ROLE IF NOT EXISTS some WITH SUPERUSER = true AND LOGIN = true AND PASSWORD = 'supersome';
LIST ROLES;

```

How can I do this automatically without ENTRYPOINT?(because I already tried it for 2 days now and I got tired of it - not working)
(Please provide code instead of words because I am newby.)

Dockerfile is created by shell script:

```
if [[ ! -e Dockerfile ]]; then
    touch Dockerfile
    cat >> Dockerfile << EOF
    FROM cassandra:latest
    COPY cassandra.yaml cassandra:etc/cassandra/cassandra.yaml
EOF
fi

```

docker-entrypoint.sh was not changed - so it is the same as the default one provided by cassandra latest image.