mirror of
https://github.com/linux-odyssey/linux-odyssey.git
synced 2026-11-06 03:20:13 +08:00
wip: connect container through ssh
This commit is contained in:
1 parent
08e9191c4b
commit
19897e607f
4 files changed
+73
-12
No files matched your search
@@ -5,14 +5,24 @@ import logger from '../utils/logger.js'
|
||||
const engine = new Docker()
|
||||
|
||||
const containerOptions = {
|
||||
AttachStdin: true,
|
||||
AttachStdout: true,
|
||||
AttachStderr: true,
|
||||
Tty: true,
|
||||
OpenStdin: true,
|
||||
StdinOnce: false,
|
||||
// AttachStdin: true,
|
||||
// AttachStdout: true,
|
||||
// AttachStderr: true,
|
||||
// Tty: true,
|
||||
// OpenStdin: true,
|
||||
// StdinOnce: false,
|
||||
HostConfig: {
|
||||
NetworkMode: config.docker.network,
|
||||
PortBindings: {
|
||||
'22/tcp': [
|
||||
{
|
||||
HostPort: '11122', // random port
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
ExposedPorts: {
|
||||
'22/tcp': {},
|
||||
},
|
||||
} as Docker.ContainerCreateOptions
|
||||
|
||||
|
||||
Reference in new issue
Block a user