-
Notifications
You must be signed in to change notification settings - Fork 2
Open
Labels
Description
agent.autoload
def autoload(instance_id, app_path):
# Check for user-defined autoload.sh
# TODO: In a newer release, docker will have functionality to run
# a command inside a running container. This will remove
# dependency of lxc-attach.
container = Container(instance_id)
autoload_file = '/usr/share/stretch/autoload.sh'
code = call(['lxc-attach', '-n', container.id, '--', '/bin/bash',
autoload_file])
if code == 3:
# No user-defined autoload.sh, restart container
container.restart()Docker provides this functionality in a future release. Switch when stable.