Unable to run cinc-server-ctl smoke tests inside Docker container
Cinc Server has smoke tests which are run with cinc-server-ctl test
, however these require a run of cinc-server-ctl reconfigure
prior to being executed.
When running inside a docker container, cinc-server-ctl reconfigure
fails because it uses runit
to manage services, and that fails because there's no init at PID1 (nor systemd)
These instructions provide a workaround :
Dockerfile:
ADD /path/to/chef-server-startup.sh /chef-server-startup.sh CMD ["bash", "/chef-server-startup.sh"]
chef-server-startup.sh
:#!/bin/bash export PATH=/opt/opscode/bin:/opt/opscode/bin/embedded:$PATH # Start this so that chef-server-ctl sv-related commands can # interact with its services via runsv /opt/opscode/embedded/bin/runsvdir-start & chef-server-ctl reconfigure # Something useful that also keeps the container running... tail -f /var/log/opscode/nginx/access.log