Add support for docker run --tmpfs flag.
Signed-off-by: Philip Walls <pawalls@rabidgeek.com>
This commit is contained in:
parent
25cbc2aae9
commit
85c7d3e5ce
9 changed files with 37 additions and 5 deletions
|
|
@ -875,6 +875,11 @@ class ServiceTest(DockerClientTestCase):
|
|||
container = create_and_start_container(service)
|
||||
self.assertEqual(container.get('HostConfig.DnsSearch'), ['dc1.example.com', 'dc2.example.com'])
|
||||
|
||||
def test_tmpfs(self):
|
||||
service = self.create_service('web', tmpfs=['/run'])
|
||||
container = create_and_start_container(service)
|
||||
self.assertEqual(container.get('HostConfig.Tmpfs'), {'/run': ''})
|
||||
|
||||
def test_working_dir_param(self):
|
||||
service = self.create_service('container', working_dir='/working/dir/sample')
|
||||
container = service.create_container()
|
||||
|
|
|
|||
|
|
@ -1194,6 +1194,21 @@ class ConfigTest(unittest.TestCase):
|
|||
}
|
||||
]
|
||||
|
||||
def test_tmpfs_option(self):
|
||||
actual = config.load(build_config_details({
|
||||
'web': {
|
||||
'image': 'alpine',
|
||||
'tmpfs': '/run',
|
||||
}
|
||||
}))
|
||||
assert actual.services == [
|
||||
{
|
||||
'name': 'web',
|
||||
'image': 'alpine',
|
||||
'tmpfs': ['/run'],
|
||||
}
|
||||
]
|
||||
|
||||
def test_merge_service_dicts_from_files_with_extends_in_base(self):
|
||||
base = {
|
||||
'volumes': ['.:/app'],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue