docker-compose fail to maintain up centos build

Im building a basic centos image with only some packages but Im forgotting something because finish well but not maintain the container. What Im doing bad?

docker-compose:

version: '3'
services:
  config_server:
    build: ../common/docker/ansible/.
    stdin_open: true
    volumes:
      - ../../api:/var/www/api
      - ../../server:/var/www/server
      - ../server/provision/server:/tmp/ansible
    working_dir: /tmp/ansible
    networks:
      net:
        ipv4_address: 172.28.0.10
    command: ansible-playbook playbook.yml

networks:
  net:
    driver: bridge
    ipam:
      driver: default
      config:
        - subnet: 172.28.0.0/24

Dockerfile:

FROM centos:7
RUN yum makecache && yum install -y epel-release wget
RUN yum install -y ansible

I would like to check If all tasks was well, and using:

docker logs 

I see logs from ansible script finishing well. But I don’t know why not maintains container with Exited (0) error

command used is

docker-compose up -d --build 

Suggestions?

Go to Source
Author: deconya