Skip to content

Commit

Permalink
chore: use new sshd:1.2.0 image (#758)
Browse files Browse the repository at this point in the history
  • Loading branch information
mdelapenya committed Apr 26, 2024
1 parent 090e94f commit 441743c
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/testcontainers/src/port-forwarder/port-forwarder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down Expand Up @@ -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;
Expand Down

0 comments on commit 441743c

Please sign in to comment.