Created
September 15, 2015 06:33
-
-
Save Markbnj/f9aaabecead17bc3b7d7 to your computer and use it in GitHub Desktop.
Allow services to start in an Ubuntu 15.04 Docker container
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# By default the /usr/sbin/policy-rc.d script in the ubuntu:15.04 docker image is set to return 101 | |
# (action forbidden by policy) every time it is invoked. This prevents systemctl start requests for | |
# services from completing succesfully. The following command overwrites the contents of policy-rc.d | |
# to allow service starts. | |
# | |
# Note that this won't work right under bash due to expansion of the '!' character. Docker uses sh | |
# by default when executing the commands in the dockerfile, so this will work there, and you can | |
# also use sh interactively to run this. | |
echo "#!/bin/sh\nexit 0" > /usr/sbin/policy-rc.d |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment