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
@@ -40,6 +40,7 @@
|
||||
"passport-jwt": "^4.0.1",
|
||||
"passport-local": "^1.0.0",
|
||||
"socket.io": "^4.7.1",
|
||||
"ssh2": "^1.16.0",
|
||||
"swagger-ui-express": "^5.0.0",
|
||||
"validator": "^13.11.0",
|
||||
"winston": "^3.11.0",
|
||||
|
||||
@@ -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