{"id":19402342,"url":"https://github.com/robertdebock/docker-centos-openssh","last_synced_at":"2025-04-24T07:31:35.673Z","repository":{"id":45451836,"uuid":"56568929","full_name":"robertdebock/docker-centos-openssh","owner":"robertdebock","description":"A CentOS 7 container that runs openssh server","archived":false,"fork":false,"pushed_at":"2024-02-29T10:51:11.000Z","size":105,"stargazers_count":16,"open_issues_count":1,"forks_count":16,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-20T10:16:43.724Z","etag":null,"topics":["bats","centos","docker","docker-centos-openssh","openssh","ssh-key"],"latest_commit_sha":null,"homepage":null,"language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/robertdebock.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2016-04-19T06:01:03.000Z","updated_at":"2025-04-09T10:11:03.000Z","dependencies_parsed_at":"2024-02-29T12:00:40.792Z","dependency_job_id":"0bca5662-02e7-4e3c-87b9-f9b3b1dea729","html_url":"https://github.com/robertdebock/docker-centos-openssh","commit_stats":null,"previous_names":[],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fdocker-centos-openssh","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fdocker-centos-openssh/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fdocker-centos-openssh/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/robertdebock%2Fdocker-centos-openssh/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/robertdebock","download_url":"https://codeload.github.com/robertdebock/docker-centos-openssh/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250582909,"owners_count":21453927,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bats","centos","docker","docker-centos-openssh","openssh","ssh-key"],"created_at":"2024-11-10T11:23:12.056Z","updated_at":"2025-04-24T07:31:35.415Z","avatar_url":"https://github.com/robertdebock.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-centos-openssh\n\nA CentOS container that runs openssh server.\n\n[![Build Status](https://travis-ci.com/robertdebock/docker-centos-openssh.svg?branch=master)](https://travis-ci.com/robertdebock/docker-centos-openssh) [![](https://images.microbadger.com/badges/image/robertdebock/docker-centos-openssh.svg)](http://microbadger.com/images/robertdebock/docker-centos-openssh \"Get your own image badge on microbadger.com\")\n\nYou can use this container to quickly startup a \"machine\" and test things, or it can be used as an SSH server, maybe a stepstone.\n\nThis container will generate new keys (host and user) at startup if none are loaded by attaching a volume.\n\n## Running the container.\n\nIt's quite easy to start a container:\n\n```bash\ndocker run -P robertdebock/docker-centos-openssh\n```\n\nFor Podman, please use:\n\n```bash\npodman run --cap-add AUDIT_WRITE -P robertdebock/docker-centos-openssh\n```\n\n(The `--cap-add AUDIT_WRITE` is added to overcome an [issue](https://bugzilla.redhat.com/show_bug.cgi?id=1923728).)\n    \nA private key will be displayed, copy-pasts-save it, set the permissions to 0600.\n\nFind out what port Docker has connected to the container:\n\n```bash\ndocker port docker-centos-openssh\n```\n\nAnd connect to the container:\n\n```bash\nssh -p ${port} -i ${savedkey} root@${ip}\n```\n\nThe ${ip} depends on where the container is running.\n\n## Using your own private key\n\nSimply save your key in a folder like \"dot-ssh\" and map the volumes:\n\n```bash\ndocker run -P -v $(pwd)/./ssh:/root/.ssh/ robertdebock/docker-centos-openssh\n```\n\n## Using with docker-compose\n\nYou may setup a testlab, for example for Ansible or Rundeck, using Docker-compose, like so:\n\n```yaml\nversion: '3'\nservices:\n  server:\n    image: robertdebock/docker-centos-openssh\n    volumes:\n      - /path/to/dot-ssh:/root/.ssh/\n    links:\n      - client1\n      - client2\n      - client3\n    ports:\n      - \"2222:22\"\n  client1:\n    image: robertdebock/docker-centos-openssh\n    volumes:\n      - /path/to/dot-ssh:/root/.ssh/\n  client2:\n    image: robertdebock/docker-centos-openssh\n    volumes:\n      - /path/to/dot-ssh:/root/.ssh/\n  client3:\n    image: robertdebock/docker-centos-openssh\n    volumes:\n      - /path/to/dot-ssh:/root/.ssh/\n```\n\n# Technologies used to build and test\n\n- [Travis CI](https://travis-ci.com/robertdebock/docker-centos-openssh) is used to build, run and test the image.\n- [Docker Hub](https://hub.docker.com/r/robertdebock/docker-centos-openssh/) is used to deploy the image to.\n\nBuilding on Travis CI and publishing to Docker Hub happens in parallel. On Travis CI, few project are used:\n\n- [Bats](https://github.com/sstephenson/bats) for testing.\n- [Docker Lint](https://github.com/projectatomic/dockerfile_lint) for finding weird errors.\n\nA bit weird about this setup is that when the build fails, an image is still published.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdebock%2Fdocker-centos-openssh","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frobertdebock%2Fdocker-centos-openssh","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frobertdebock%2Fdocker-centos-openssh/lists"}