Category : command

i’m using a docker container to execute multiple commands within a chroot environment. My plan is to execute something like this: chroot /host sh -c "command1 | command2; command3" Obviously commands placeholders substituted with appropriate stuff. The only way I managed to the this working was to use a script file: script.sh: command1 | command2 ..

Read more

Hello I am trying to deploy a mongoDB database in a yaml file and when I start the container y want to execute the following command: sudo rm -rf /data/db/mongod.lock The .yml file is the following mongo-db: image: mongo:4.0 logging: driver: "json-file" options: max-size: "10m" max-file: "7" hostname: mongo-db ports: – "27017:27017" networks: – smartcity ..

Read more

I want to run the init.sql file after mysql container has started completely. I am using the following docker compose file. It is saying no /var/initdb/init.sql file with the following compose file. services: mysqldb: container_name: mysql image: mysql restart: always ports: – "3306:3306" volumes: – /mysql-schema :/var/schema – /init :/var/initdb command: sh -c "mysql -u ..

Read more