{"id":19632539,"url":"https://github.com/metwork-framework/docker-centos7-opinionated","last_synced_at":"2026-05-16T08:38:27.899Z","repository":{"id":94537118,"uuid":"222121716","full_name":"metwork-framework/docker-centos7-opinionated","owner":"metwork-framework","description":"An opinionated centos7 docker image to be used as a base. Inspired from phusion baseimage (but for centos). Provides S6 process manager, cronie, sshd in a configurable way.","archived":false,"fork":false,"pushed_at":"2023-12-01T13:30:29.000Z","size":32,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-02-26T21:16:02.782Z","etag":null,"topics":["autoreadme","centos7","docker-image","s6-overlay"],"latest_commit_sha":null,"homepage":"https://hub.docker.com/repository/docker/metwork/centos7-opinionated","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/metwork-framework.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null}},"created_at":"2019-11-16T15:49:25.000Z","updated_at":"2024-06-21T13:52:13.000Z","dependencies_parsed_at":"2023-12-01T14:45:06.027Z","dependency_job_id":null,"html_url":"https://github.com/metwork-framework/docker-centos7-opinionated","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/metwork-framework/docker-centos7-opinionated","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metwork-framework%2Fdocker-centos7-opinionated","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metwork-framework%2Fdocker-centos7-opinionated/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metwork-framework%2Fdocker-centos7-opinionated/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metwork-framework%2Fdocker-centos7-opinionated/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/metwork-framework","download_url":"https://codeload.github.com/metwork-framework/docker-centos7-opinionated/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/metwork-framework%2Fdocker-centos7-opinionated/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266606003,"owners_count":23955200,"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","status":"online","status_checked_at":"2025-07-23T02:00:09.312Z","response_time":66,"last_error":null,"robots_txt_status":null,"robots_txt_updated_at":null,"robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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":["autoreadme","centos7","docker-image","s6-overlay"],"created_at":"2024-11-11T12:14:23.893Z","updated_at":"2026-05-16T08:38:22.864Z","avatar_url":"https://github.com/metwork-framework.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# docker-centos7-opinionated\n\n[//]: # (automatically generated from https://github.com/metwork-framework/github_organization_management/blob/master/common_files/README.md)\n\n**Status (master branch)**\n\n[![GitHub CI](https://github.com/metwork-framework/docker-centos7-opinionated/actions/workflows/ci.yml/badge.svg?branch=master)](https://github.com/metwork-framework/docker-centos7-opinionated/actions?query=workflow%3ACI+branch%3Amaster)\n[![DockerHub](https://github.com/metwork-framework/resources/blob/master/badges/dockerhub_link.svg)](https://hub.docker.com/r/metwork/centos7-opinionated/)\n[![Maintenance](https://raw.githubusercontent.com/metwork-framework/resources/master/badges/maintained.svg)](https://github.com/metwork-framework/resources/blob/master/badges/maintained.svg)\n\n\n\n\n## Features\n\nThis repository holds an opinionated centos (version 7) docker image to be used as a \nbase docker image. Some inspiration sources are given at the end of this file.\n\nFeatures:\n\n- Updated image (at build time)\n- Reasonable size (\u003c 100 MB on the docker hub), reasonable number of layers (8) with a squashed Dockerfile\n- Don't add too many packages by installing just what's needed\n- Don't break the upstream system\n- Init system and multiple processes launcher/supervisor ([S6](http://skarnet.org/software/s6/overview.html))\n- (optional) complete cron/anacron daemon ([cronie](https://fedorahosted.org/cronie/))\n- (optional) SSH server\n\n## Usage and configuration\n\nNot really usefull (because it's mainly a base image to use in the `FROM` keyword) but you can play with it with (for example):\n\n    docker run -i -t metwork/centos7-opinionated:latest bash\n\nAvailable environnement variables:\n\n- `DCO_CRONIE_START` (if \"1\" (default) then start the cron daemon)\n- `DCO_SSHD_START` (if \"0\" (default) then do not start the sshd daemon)\n\nIf you set `DCO_SSHD_START=1`, you can also use following environnement variables:\n\n- `DCO_SSHD_FORCE_RSA_HOST_KEY`\n- `DCO_SSHD_FORCE_RSA_HOST_PUB_KEY`\n- `DCO_SSHD_FORCE_ECDSA_HOST_KEY`\n- `DCO_SSHD_FORCE_ECDSA_HOST_PUB_KEY`\n- `DCO_SSHD_FORCE_ED25519_HOST_KEY`\n- `DCO_SSHD_FORCE_ED25519_HOST_PUB_KEY`\n\nto force sshd host keys.\n\nYou can also use:\n\n- `DCO_SSHD_ADD_ROOT_AUTHORIZED_KEY` to add the given public key to `/root/.ssh/authorized_keys`\n- `DCO_FORCE_ROOT_PASSWORD` to force the root password \n\nIf you prefer, you can also use a volume mounted in `/force` in the container with:\n\n- `/force/root_password` (instead of `DCO_FORCE_ROOT_PASSWORD`)\n- `/force/ssh_host_rsa_key`\n- `/force/ssh_host_rsa_key.pub`\n- `/force/ssh_host_ed25519_key`\n- `/force/ssh_host_ed25519_key.pub`\n- `/force/ssh_host_ecdsa_key`\n- `/force/ssh_host_ecdsa_key.pub` (instead of corresponding `DCO_SSHD_FORCE_*_KEY`)\n- `/force/root_authorized_keys` (the content of this file will be appended to `/root/.ssh/authorized_keys`)\n\n## FAQ\n\n### How to override this image to add your service on top of it ?\n\nWhen you start this image with the default \"entrypoint\" (`/init`), it launch the S6 process supervisor (see links at the end) \nprovided by the [s6-overlay](https://github.com/just-containers/s6-overlay).\n\nFirst, it executes `/etc/cont-init.d/*` initialization (short) tasks. Then, it launchs `/etc/services.d/*/run` script. This script\nmust execute your daemon in a long-lived way and will have to deal with signals. If this \"run script\" exits, it will be automatically \nrestarted. An easy way to write a such script is to use the \"exec\" bash builtin with the \"foreground mode\" startup command of your service.\n\nFor example:\n\n```bash\n#!/bin/sh\n\nexec /sbin/rsyslogd -n\n```\n\nBecause of \"exec\", the script will be replaced by the launched command. So you won't have to deal with signals by yourself.\n\nSo a complete example to override this image with a new service on top of it can be:\n\n```\n$ find my_image\n\nmy_image/\nmy_image/Dockerfile\nmy_image/root\nmy_image/root/etc\nmy_image/root/etc/cont-init.d\nmy_image/root/etc/cont-init.d/my_initialization_script\nmy_image/root/etc/services.d\nmy_image/root/etc/services.d/myapp\nmy_image/root/etc/services.d/myapp/run\n```\n\nWith `my_image/Dockerfile` like:\n\n```\nFROM metwork/centos7-opinionated\n\nCOPY root /\n```\n\nAnd that's all ! Your custom service will be executed as well as sshd, cron services provides by the base image.\n\n## Can I use CMD with the init entrypoint ?\n\nYes, quotted from the [s6-overlay](https://github.com/just-containers/s6-overlay) README:\n\n\u003e Using CMD is a really convenient way to take advantage of the s6-overlay. \n\u003e Your CMD can be given at build-time in the Dockerfile, or at runtime on the command line, either way is fine - it will be run under the s6 supervisor, and when it fails or exits, the container will exit. You can even run interactive programs under the s6 supervisor!\n\nPlease consult [s6-overlay](https://github.com/just-containers/s6-overlay) REAME for examples and more details.\n\n## (some) Inspiration sources\n\n- [the-5-most-important-things-ive-learned-from-using-docker](http://blog.tutum.co/2014/10/28/the-5-most-important-things-ive-learned-from-using-docker/)\n- [docker-and-s6-my-new-favorite-process-supervisor](http://blog.tutum.co/2014/12/02/docker-and-s6-my-new-favorite-process-supervisor/)\n- [baseimage-docker](http://phusion.github.io/baseimage-docker/)\n- [s6-overlay](https://github.com/just-containers/s6-overlay)\n- [s6](http://skarnet.org/software/s6/overview.html)\n- [cronie](https://fedorahosted.org/cronie/)\n\n\n\n\n\n\n## Contributing guide\n\nSee [CONTRIBUTING.md](CONTRIBUTING.md) file.\n\n\n\n## Code of Conduct\n\nSee [CODE_OF_CONDUCT.md](CODE_OF_CONDUCT.md) file.\n\n\n\n## Sponsors\n\n*(If you are officially paid to work on MetWork Framework, please contact us to add your company logo here!)*\n\n[![logo](https://raw.githubusercontent.com/metwork-framework/resources/master/sponsors/meteofrance-small.jpeg)](http://www.meteofrance.com)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetwork-framework%2Fdocker-centos7-opinionated","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmetwork-framework%2Fdocker-centos7-opinionated","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmetwork-framework%2Fdocker-centos7-opinionated/lists"}