Change working dir through fig.yml

Closes #144

Signed-off-by: Alexey Lebedeff <binarin@gmail.com>
This commit is contained in:
Alexey Lebedeff 2014-07-06 20:09:30 +04:00
parent 2924b9997a
commit d83bdd5164
2 changed files with 7 additions and 1 deletions

View File

@ -11,7 +11,7 @@ from .progress_stream import stream_output, StreamOutputError
log = logging.getLogger(__name__)
DOCKER_CONFIG_KEYS = ['image', 'command', 'hostname', 'user', 'detach', 'stdin_open', 'tty', 'mem_limit', 'ports', 'environment', 'dns', 'volumes', 'entrypoint', 'privileged', 'volumes_from', 'net']
DOCKER_CONFIG_KEYS = ['image', 'command', 'hostname', 'user', 'detach', 'stdin_open', 'tty', 'mem_limit', 'ports', 'environment', 'dns', 'volumes', 'entrypoint', 'privileged', 'volumes_from', 'net', 'working_dir']
DOCKER_CONFIG_HINTS = {
'link' : 'links',
'port' : 'ports',
@ -19,6 +19,7 @@ DOCKER_CONFIG_HINTS = {
'priviliged': 'privileged',
'privilige' : 'privileged',
'volume' : 'volumes',
'workdir' : 'working_dir',
}
VALID_NAME_CHARS = '[a-zA-Z0-9]'

View File

@ -301,3 +301,8 @@ class ServiceTest(DockerClientTestCase):
service = self.create_service('web', net='host')
container = service.start_container().inspect()
self.assertEqual(container['HostConfig']['NetworkMode'], 'host')
def test_working_dir_param(self):
service = self.create_service('container', working_dir='/working/dir/sample')
container = service.create_container().inspect()
self.assertEqual(container['Config']['WorkingDir'], '/working/dir/sample')