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 ..
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 ..
I have a docker-compose yml file that looks like this: version: "3.9" services: test: image: test I can run five instances of the "test" image using this command: sudo docker-compose up -d –scale test=5 I need to know how can I pass commands to each of those instances to be executed. If the name of ..
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 ..
How to change the Docker ENTRYPOINT in a Kubernetes deployment, without changing also the Docker CMD? In the Pod I would do image: "alpine" entrypoint: "/myentrypoint" but this overwrites either ENTRYPOINT and the CMD from the Dockerfile. The documentation doesn’t mention it, but seems like a big use-case missed. Source: Docker..
I have started bash session with docker exec -it containername bash and then started a long running command in the bash session. Unfortunatelly my network session was lost, so if I recoonect I see my command is still running, but I need to see the console output. Is there a way to connect to the ..
I want to create a docker run command from the AWS ECS task definition. is there any tool available in which we will fill the values in the User interface and it will generate a docker run command for me? Source: Docker..
Why Docker image build is getting failed when build with – ? Host Details – docker desktop community 188.8.131.52 for Windows – Windows 10 Dockerfile: FROM ubuntu:latest MAINTAINER "[email protected]" RUN apt-get update && apt-get install -y python3-pip python3-dev && cd /usr/local/bin && ln -s /usr/bin/python3 python && pip3 install –upgrade pip WORKDIR /app COPY . ..
I have an application in php that works on the docker. I would like to send a command from php code to container that should create files (some_dir/certs/cert.crt etc.). This command i run like this system("traefik-certs-dumper file –source acme.json –dest some_dir –version v2"); When php run this code then directory has been created but not ..
I’m new to dockers and other concepts. I’ve lots of unused dockers running and I would want to remove all of them. Now I’m manually killing it. Can we do it at once? Source: Docker..