mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 11:30:13 +08:00
Feat filegraph (#194)
* feat: update filegraph on touch command * feat: update filegraph on mkdir * feat: add different parsing opts for each command * refactor: replace axios with fetch. put handleCommand to a new file * feat: add config for mounting cli in dev stage * refactor: clean up unused validators * feat: add command handler for copy files. reuse resolvePath function * feat: add rm handler, support specific files deletion. Glob not supported yet * feat: handle discover cases that the folder is actually empty * feat: handle discover empty folder better and support rmdir * feat: handle mv command * refactor: remove unused console logs
This commit is contained in:
1 parent
a732c1d119
commit
f0a09ac4d9
19 files changed
+326
-119
No files matched your search
@@ -39,13 +39,18 @@ export async function createContainer(
|
||||
`${config.docker.hostProjectRoot}/quests/${questId}/home:/etc/skel:ro`
|
||||
)
|
||||
}
|
||||
if (!config.isProduction && config.docker.mountQuest && imageId !== 'base') {
|
||||
if (config.docker.mountQuest && imageId !== 'base') {
|
||||
logger.info('Mounting quest directory', questId)
|
||||
binds = [
|
||||
`${config.docker.hostProjectRoot}/quests/${questId}/home:/home/commander`,
|
||||
`${config.docker.hostProjectRoot}/packages/container:/usr/local/lib/container`,
|
||||
]
|
||||
}
|
||||
if (config.docker.mountCLI) {
|
||||
logger.info('Mounting CLI', questId)
|
||||
binds.push(
|
||||
`${config.docker.hostProjectRoot}/packages/container:/usr/local/lib/container`
|
||||
)
|
||||
}
|
||||
const option = newContainerOptions(name, imageId, { binds })
|
||||
await createNetworkIfNotExists(config.docker.network)
|
||||
return engine.createContainer(option)
|
||||
|
||||
Reference in new issue
Block a user