diff options
author | Frantisek Sumsal <frantisek@sumsal.cz> | 2019-05-19 23:26:35 +0200 |
---|---|---|
committer | Frantisek Sumsal <frantisek@sumsal.cz> | 2019-05-19 23:37:07 +0200 |
commit | 75acb946cc97f3434714391ccd4fc0674e05ab0f (patch) | |
tree | 0ace6bda4dc9f56b077aa9365e307cb93c46f1cc /travis-ci | |
parent | 98a3c188a1511caae422b2c891f3cc016824eb81 (diff) | |
download | systemd-75acb946cc97f3434714391ccd4fc0674e05ab0f.tar.gz |
travis: set the `container` env variable explicitly
As we build a custom Docker image, we need to ensure that systemd
correctly detects it's running in a container. One can simply do this
directly in a Dockerfile (ENV container docker) or when starting the
container (-e container=docker). For the sake of readability, let's
pick the latter approach here.
Diffstat (limited to 'travis-ci')
-rwxr-xr-x | travis-ci/managers/debian.sh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/travis-ci/managers/debian.sh b/travis-ci/managers/debian.sh index 72ffcee439..43cbea20f4 100755 --- a/travis-ci/managers/debian.sh +++ b/travis-ci/managers/debian.sh @@ -32,7 +32,7 @@ for phase in "${PHASES[@]}"; do info "Using Debian $DEBIAN_RELEASE" printf "FROM debian:$DEBIAN_RELEASE\nRUN bash -c 'apt-get -y update && apt-get install -y systemd'\n" | docker build -t debian-with-systemd/latest - info "Starting container $CONT_NAME" - $DOCKER_RUN -v $REPO_ROOT:/build:rw \ + $DOCKER_RUN -v $REPO_ROOT:/build:rw -e container=docker \ -w /build --privileged=true --name $CONT_NAME \ -dit --net=host debian-with-systemd/latest /bin/systemd $DOCKER_EXEC bash -c "echo deb-src http://deb.debian.org/debian $DEBIAN_RELEASE main >>/etc/apt/sources.list" |