Skip to content

Commit

Permalink
ci: fix docker container check
Browse files Browse the repository at this point in the history
Newer version of docker no longer have the /.dockerinit file present
when the container is executing, so that is no longer an option.
When executing in a container, we do know that we will be executing
as pid 1 -- this is probably not ever the case on the host system.

Signed-off-by: Paul Osborne <osbpau@gmail.com>
  • Loading branch information
posborne committed Aug 11, 2016
1 parent cdecd1a commit 90269e4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion ci/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
set -e

# This should only be run in a docker container, so verify that
if [ ! -f /.dockerinit ]; then
if [ ! $(pidof $0) = "1" ]; then
echo "run.sh should only be executed in a docker container"
echo "and that does not appear to be the case. Maybe you meant"
echo "to execute the tests via run-all.sh or run-docker.sh."
Expand Down

0 comments on commit 90269e4

Please sign in to comment.