wip: connect container through ssh

This commit is contained in:
Justin Lin committed 2024-10-10 20:54:42 +08:00
1 parent 08e9191c4b
commit 19897e607f
4 files changed
+73 -12

No files matched your search

+16 -6
View File
@@ -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