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 - creating and starting container, differences between API and CLI
  • Rancher can pull images from private registry
  • Docker supervisor - unable to find supervisor.conf file
  • GitLab CI Docker CakePHP 2 testing doesn't work
  • How to get from Android Emulator to Docker Machine's container?
  • bundler: command not found: rails with docker-compose on a sample project
  • sudo: required
    language: ruby
      - docker
      - 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?)

  • Making the Docker Registry HA
  • Slow django model instance creation with Docker
  • How to visually see the browser being automated on Multihost docker on windows 10 and Linux ?
  • Build the Node js app on Docker
  • Where are data stored in a clustered environment?
  • docker change Ctrl+p to something else?
  • Docker will be the best open platform for developers and sysadmins to build, ship, and run distributed applications.