From 441743cbd40c490604fb101af0341d4423ce0d1f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Manuel=20de=20la=20Pe=C3=B1a?= Date: Fri, 26 Apr 2024 16:18:27 +0200 Subject: [PATCH] chore: use new sshd:1.2.0 image (#758) --- .../testcontainers/src/port-forwarder/port-forwarder.ts | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/testcontainers/src/port-forwarder/port-forwarder.ts b/packages/testcontainers/src/port-forwarder/port-forwarder.ts index f1313950..05b6f088 100644 --- a/packages/testcontainers/src/port-forwarder/port-forwarder.ts +++ b/packages/testcontainers/src/port-forwarder/port-forwarder.ts @@ -9,7 +9,7 @@ import { LABEL_TESTCONTAINERS_SESSION_ID, LABEL_TESTCONTAINERS_SSHD } from "../u export const SSHD_IMAGE = process.env["SSHD_CONTAINER_IMAGE"] ? ImageName.fromString(process.env["SSHD_CONTAINER_IMAGE"]).string - : ImageName.fromString("testcontainers/sshd:1.1.0").string; + : ImageName.fromString("testcontainers/sshd:1.2.0").string; class PortForwarder { constructor( @@ -124,11 +124,6 @@ export class PortForwarderInstance { .withExposedPorts(containerPort) .withEnvironment({ PASSWORD: this.PASSWORD }) .withLabels({ [LABEL_TESTCONTAINERS_SSHD]: "true" }) - .withCommand([ - "sh", - "-c", - `echo "${this.USERNAME}:$PASSWORD" | chpasswd && /usr/sbin/sshd -D -o PermitRootLogin=yes -o AddressFamily=inet -o GatewayPorts=yes -o AllowAgentForwarding=yes -o AllowTcpForwarding=yes -o KexAlgorithms=+diffie-hellman-group1-sha1 -o HostkeyAlgorithms=+ssh-rsa`, - ]) .start(); const host = client.info.containerRuntime.host;