I want to create a docker container on a remote host and then, in a second step build a binary for pgBackRest inside that container.
It fails with the task to create the container, install some packages for the build and then remain to run.
- name: creating a build-container
docker_container:name: pgBackRestBuilder
image: docker.io/rockylinux:8
volumes: - /data/build/:/build
state: started
restart: true
detach: true
tty: true
interactive: true
working_dir: /build
command: dnf install -y make gcc openssl-devel libxml2-devel lz4-devel libzstd-devel bzip2-devel
become: true
What happens is that the container is being spun up, running for about 90 seconds and then shutting down without (as far as I can tell) having installed i.e. make. I was thinking the detach, tty & interactive options should have made the container to last.
any hint, what I am doing wrong here?