Docker Community Forums

Share and learn in the Docker community.

Docker-compose execute additional command on boot

docker

(Kolibg) #1

Hi,

i have this in my docker-compose.yml file

...
php:
        image:whatever-php:v2 
        restart: always
        volumes:
            - "./etc/php-dev.ini:/usr/local/etc/php/conf.d/php.ini"
            - "./../:/var/www/html"
...

is there a way to execute this bash command after docker boots it up from this composer file ?

$ usermod -u 1000 www-data &&  usermod -G staff www-data