quit docker run on travis-ci

I’m testing a server that’s designed to run continuously with docker with travis-ci.org. My Dockerfile has a CMD block that prints out some version info then keeps a process foo running. However, docker run -d [docker-image-name] is expected to not quit on itself and I do not want it to keep running on travis-ci.org. I’m using docker kill $(docker ps -q) to quit but the log returns:

$ docker kill $(docker ps -q)
"docker kill" requires at least 1 argument(s).
See 'docker kill --help'.
Usage:  docker kill [OPTIONS] CONTAINER [CONTAINER...]
Kill one or more running containers

Note docker kill $(docker ps -q) runs okay locally.
My .travis.yml is:

  • Docker Local Machine
  • Bluemix docker scalable group for non HTTP requests
  • Updating kubectl with new configurations
  • Django celery in docker looking for already deleted tasks
  • Docker Machine / VirtualBox Mount Volume
  • Sending a file as a parameter to a container in order to be compiled causes problems
  • sudo: required
    
    language: ruby
    
    services:
      - docker
    
    script:
      - docker build -t test .
      - docker run -d test
      - docker ps -a
      - docker kill $(docker ps -q)
      - docker ps -a
    

    How do I quit the docker process? (Or, does travis-ci automatically quits it/do I have to take care of it myself?)

  • Running Nightwatch test inside docker - Selenium server doesn't start
  • Docker opencv3 Cmake errors
  • Docker Storage - Getting a Layman's answer
  • change timezone under docker image based on tinycore
  • How to start and register a chaincode of Hyperledger on Windows10
  • How copy files from current docker container to another container
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.