As far as I know, it's a good practice to use containers from Dockerhub instead of making my own ones. Most of those contain
docker-entrypoint.sh script that is executed on startup. However, sometimes I need to do something on startup in addition to what is already described in
docker-entrypoint.sh. Namely, I'm setting up a RabbitMQ container, I want to use a bind mount to save configs, but the config directory has to be owned by
rabbitmq user. I wish I could execute
chown -R rabbitmq /etc/rabbitmq on startup in addition to
docker-entrypoint.sh, but I don't know how to do that.
I understand that I can simply clone the repo with Dockerfile and entrypoint from git, add something to the entrypoint and build docker image manually, but it looks like a crutch. I can also just attach to the container and execute that command manually which also looks like a crutch.