fix: safety

This commit is contained in:
cha0s 2022-03-02 05:56:41 -06:00
parent c481ff4c84
commit a3703ede2e

View File

@ -42,9 +42,9 @@ export default async (flecks, key, config) => {
'-d',
'--rm',
...(config.args || []),
...Object.entries(config.ports)
...Object.entries(config.ports || {})
.map(([host, container]) => ['-p', `${host}:${container}`]).flat(),
...Object.entries(config.environment[key])
...Object.entries(config.environment[key] || {})
.map(([key, value]) => ['-e', `${key}=${value}`]).flat(),
];
const datadir = join(tmpdir(), 'flecks', id, 'docker', key);