Overview
- Full name
docker.io/testcontainers/sshd- Registry
- docker.io
- Namespace
- testcontainers
- Repository
- sshd
- Cached tags
- 6
- Last synced
- 07/06/2026, 06:41 AM
Introduction
Testcontainers 官方 SSH 测试容器镜像,供集成测试通过 SSH 验证远程命令,典型 JUnit/Testcontainers 一次性拉起。
Details
testcontainers/sshd 提供预配置 openssh 的轻量容器,Testcontainers 框架在测试中动态启动。定位为测试框架 --rm 容器,CI pipeline 自动管理生命周期;非生产 SSH 服务或常驻 Deployment。
快速启动
docker run --rm -d --name tc-sshd \
-p 2222:22 \
docker.io/testcontainers/sshd:latest
推荐实践
GenericContainer<?> sshd = new GenericContainer<>("docker.io/testcontainers/sshd:1.1.0")
.withExposedPorts(22);
sshd.start();
核心参数说明
- 定位 — Testcontainers 测试依赖
-p 2222:22— SSH 测试端口- 生命周期 — 测试结束自动销毁
- 勿 — 生产 SSH 网关
Latest tags (20)
View all 6 tags →| Tag | Arch | Pushed At | Size | Digest | Sync | Wish | Action |
|---|---|---|---|---|---|---|---|
docker.io/testcontainers/sshd :1.4.0 | linux/amd64linux/arm/v7linux/arm64linux/ppc64lelinux/s390x | 2026/06/12 23:44 | 6.5 MB | sha256:a1b4ec00f6fe… | |||
docker.io/testcontainers/sshd :1.3.0 | linux/amd64linux/arm/v7linux/arm64linux/ppc64lelinux/s390x | 2025/06/28 01:48 | 5.9 MB | sha256:7dc5a5349906… | |||
docker.io/testcontainers/sshd :1.2.0 | linux/amd64linux/arm/v7linux/arm64linux/ppc64lelinux/s390x | 2024/04/24 17:22 | 5.5 MB | sha256:c2d6848a3ab6… | |||
docker.io/testcontainers/sshd :1.1.0 | linux/amd64linux/arm/v7linux/arm64linux/ppc64lelinux/s390x | 2022/06/11 07:23 | 4.9 MB | sha256:7879c6c99eea… | |||
docker.io/testcontainers/sshd :1.0.0 | linux/amd64 | 2020/06/06 03:55 | 3.3 MB | sha256:c1185b087401… | |||
docker.io/testcontainers/sshd :latest | linux/amd64 | 2020/06/06 03:29 | 3.3 MB | sha256:95c55d595541… |