Reputation: 712
I am trying to execute docker-compose on top of official Cassandra docker image
.
Basically, I am trying to set a few of properties present inside Cassandra image at /etc/cassandra/cassandra.yaml
.
My docker-compose looks like
version: '3.0'
services:
cassandra:
image: cassandra:3.11.6
ports:
- "9042:9042"
environment:
- CASSANDRA_ENABLE_USER_DEFINED_FUNCTIONS=true
# restart: always
volumes:
- ./cassandra-dc-1:/usr/local/bin/
container_name: cassandra-dc-1
entrypoint: /usr/local/bin/docker-entrypoint.sh
# command: /usr/local/bin/docker-entrypoint.sh
When I run docker-compose up --build
I get below error, from the directory where I have the docker-compose.yaml
present
cassandra-dc-1 | find: ‘’: No such file or directory
cassandra-dc-1 exited with code 1
I tried giving
I am unable to figure out what is wrong.
Upvotes: 2
Views: 1465
Reputation: 60046
Basically, I am trying to set a few of properties present inside Cassandra image at
/etc/cassandra/cassandra.yaml
.
If you just to set properties in yaml
file you do not need to override the entrypoint as it will hide a lot of executable not only entrypoint by doing below
volumes:
- ./cassandra-dc-1:/usr/local/bin/
Do not mound the whole directory /usr/local/bin/
.
If you just want to override entrypoint then do the following
volumes:
- ./cassandra-dc-1/docker-entrypoint.sh:/usr/local/bin/docker-entrypoint.sh
Custom config file
FROM cassandra:3.11.6
copy my_customconfig.yml /etc/cassandra/cassandra.yaml
That's all you need to run with custom config, copy the config during build time.
or with docker-compose
volumes:
- ./cassandra.yaml:/etc/cassandra/cassandra.yaml
Upvotes: 1