title: running a docker container with systemd
body: <p>I have a service definition that starts a docker container using systemd on CentOS 7:</p>
  
  <pre><code>[Unit]
  Description=MappingService
  After=portal.service
  Requires=docker.service
  
  [Service]
  TimeoutStartSec=3000
  Type=forking
  WorkingDirectory=/home/user/Downloads/MS_0.3.4_artifact
  ExecStartPre=-/bin/docker rm -f eb-mapping-service-container
  ExecStartPre=/home/user/Downloads/MS_0.3.4_artifact/deploy.sh /home/user/Downloads/MS_0.3.4_artifact/eb-mapping-service.tgz
  ExecStartPre=/bin/docker run -v /dev/log:/dev/log -d -ti --log-driver=journald --network=bridge -p 9090:9090 --name eb-mapping-service-container eb-mapping-service  /bin/bash -c "cd /build/MappingService; ./start_multiple_clients_mapping_service.sh"
  ExecStart=/bin/docker start -a eb-mapping-service-container
  ExecStop=/bin/docker stop eb-mapping-service-container
  
  [Install]
  WantedBy=multi-user.target
  </code></pre>
  
  <p>This service works. The Docker container it launches is up.
  Whenever I boot the computer it is running. My problem with this service is that it's never reaching the Active(Running) status. Instead, it is stuck in 'Activating(start)' status.
  The 'start_multiple_clients_mapping_service.sh' script starts a node.js server and it starts listening, so it isn't exiting directly.</p>
  
  <p>I've searched everywhere and scoured Docker's documentation about this and couldn't find an answer.</p>
  
  <p>Also, if I remove the '-a' from the docker start command, then the status will be Inactive(dead) even though the container will be up and running.
  Update:
  After a while, I don't have an exact number, the service fails with the timeout reason. This isn't after 3000 seconds but way earlier. <strong>Although the service failed, the docker is still on the air and can be used</strong>.<br>
  I've verified with <code>docker container ls</code></p>
  
  <p><strong>Question:<br>
  How do I change my service definition to reflect the Active(Running) status for the docker?</strong></p>