Merge branch 'docker-systemd' into 'master'

Skip selecting an init system in our Docker image so it won't error out.

In the Ubuntu 16.04 docker image image, systemd failing for our setup and causing an error during reconfigure.

Fixes https://gitlab.com/gitlab-org/omnibus-gitlab/issues/1365

cc\ @stanhu @marin 

See merge request !838
This commit is contained in:
DJ Mountney 2016-06-23 01:19:37 +00:00
parent 7a844742d2
commit e229a96888
1 changed files with 3 additions and 2 deletions

View File

@ -16,8 +16,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
#
if system('/sbin/init --version | grep upstart')
if File.exist?('/.dockerenv')
Chef::Log.warn "Skipped selecting an init system because it looks like we are running in a container"
elsif system('/sbin/init --version | grep upstart')
Chef::Log.warn "Selected upstart because /sbin/init --version is showing upstart."
include_recipe "runit::upstart"
elsif system('systemctl | grep "\-\.mount"')