title: Ansible Docker: Execute shell file with container
body: <p>I have the following Docker Command:</p>
  
  <pre><code>docker run -d  --name ADMIN_SERVER_TEST1 --network=soa_net --ip=172.16.1.11 -p 7001:7001 -v /Oracle_Volumes/ENVIRONMENTS/TEST1/SOA-Volume/cheetah_domain:/u01/oracle/user_projects   --env-file $ENV_HOME/adminserver-test1.env.list --env-file $ENV_HOME/soaserver-test1.env.list -u root redreply/soa-suite:12.2.1.3 ./dockertools/createDomainAndStart.sh &amp;&amp; docker logs -f ADMIN_SERVER_TEST1
  </code></pre>
  
  <p>For this command, I have created the following Script with Ansible:</p>
  
  <pre><code>  - name: Create SOA container
      docker_container:
        name: "{{ name }}"
        image: "{{ image }}"
        detach: yes
        privileged: yes
        user: root
        volumes:
            - "{{ src_vol }}:{{ dest_vol }}"
        ports:
            - 7001:7001
        networks: 
          - name: soa_net
            ipv4_address: "{{ ip }}"
            env_file: 
              - "{{ env_file_1}}"
              - "{{ env_file_2}}"
  </code></pre>
  
  <p>But I have no clue how to add this part to Ansible script:</p>
  
  <pre><code>./dockertools/createDomainAndStart.sh &amp;&amp; docker logs -f ADMIN_SERVER_TEST1
  </code></pre>