mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-07 19:10:12 +08:00
feat: init cmd-hook and move terminal-service to services directory
feat: put cmd-hook in container feat: cmd-hook request type, auto restart setup feat: handle ls
This commit is contained in:
1 parent
58b6448c3d
commit
0b08a9a5d9
16 files changed
+343
-21
No files matched your search
@@ -32,7 +32,7 @@ export async function createContainer(
|
||||
questId: string,
|
||||
imageId: string
|
||||
): Promise<Docker.Container> {
|
||||
let binds: string[] = []
|
||||
const binds: string[] = []
|
||||
if (await questHomeExists(questId)) {
|
||||
logger.info('Mounting quest home', questId)
|
||||
binds.push(
|
||||
@@ -41,14 +41,14 @@ export async function createContainer(
|
||||
}
|
||||
if (config.docker.mountQuest && imageId !== 'base') {
|
||||
logger.info('Mounting quest directory', questId)
|
||||
binds = [
|
||||
`${config.docker.hostProjectRoot}/quests/${questId}/home:/home/commander`,
|
||||
]
|
||||
binds.push(
|
||||
`${config.docker.hostProjectRoot}/quests/${questId}/home:/home/commander`
|
||||
)
|
||||
}
|
||||
if (config.docker.mountCLI) {
|
||||
logger.info('Mounting CLI', questId)
|
||||
binds.push(
|
||||
`${config.docker.hostProjectRoot}/packages/container:/usr/local/lib/container`
|
||||
`${config.docker.hostProjectRoot}/services/cmd-hook/bin:/usr/local/bin:ro`
|
||||
)
|
||||
}
|
||||
const option = newContainerOptions(name, imageId, { binds })
|
||||
|
||||
Reference in new issue
Block a user