Docker container silently killed by Travis CI

I have a Docker image with conditions that have a few custom libs compiled and installed for automating tests. It has /bin/bash as its ENTRYPOINT, so a docker container created by docker run does not immediately exit.

However, when I run it on Travis CI, it dies after a few seconds:

# .travis.yml
... (omit language, os, etc) blah 

install:
  - docker pull <dockerhub link>
  - docker run -td <dockerhub addr>
  - docker ps
  - sleep 15
  - docker ps

The first docker ps shows that the created container is up for a few seconds. However, the second docker ps shows nothing; during the 15 seconds, something happened to the container. Same if I run docker ps -A

When the commands are run on my local computer, I can observe that it is kept alive.

Why is my Docker container being killed? Any help would be appreciated!

There’s not much context here, but it seems/sounds like you’re running an image that was built from an ARM machine whereas your Travis build was using something like AMD.

Be sure to not overlap architectures. This will happen every time. Get back to me if you have any issues, take a look at your .yml file again and post back! I think this is what’s going on though.

1 Like

i had my arch’s mixed up! when double checking my YAML, it’s exactly what was going on. thanks…

Yeah, that’s what it sounded like to me reading the brief description. As always glad I could help and if you need anything else, please don’t hesitate to post back and I’ll help you.

1 Like