{"id":21703659,"url":"https://github.com/bokysan/docker-alpine-bootstrap","last_synced_at":"2025-10-26T09:03:44.037Z","repository":{"id":40478658,"uuid":"146456273","full_name":"bokysan/docker-alpine-bootstrap","owner":"bokysan","description":"Alpine distribution with a few tools (curl, sed, wget...) with an option to wait for service to startup.","archived":false,"fork":false,"pushed_at":"2024-06-17T19:57:24.000Z","size":15807,"stargazers_count":5,"open_issues_count":3,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-12T15:12:31.600Z","etag":null,"topics":["alpine","bootstrap","curl","docker","docker-image","fabric8","init","init-containers","kubernetes","kubernetes-pods","netcat","postgres","wait-for-it","waiting"],"latest_commit_sha":null,"homepage":"","language":"Shell","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bokysan.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":"2018-08-28T14:01:53.000Z","updated_at":"2025-04-09T04:14:54.000Z","dependencies_parsed_at":"2024-01-17T23:03:17.372Z","dependency_job_id":"df3b41a6-869c-4880-9099-909a0d57d522","html_url":"https://github.com/bokysan/docker-alpine-bootstrap","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokysan%2Fdocker-alpine-bootstrap","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokysan%2Fdocker-alpine-bootstrap/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokysan%2Fdocker-alpine-bootstrap/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bokysan%2Fdocker-alpine-bootstrap/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bokysan","download_url":"https://codeload.github.com/bokysan/docker-alpine-bootstrap/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248586245,"owners_count":21128998,"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":["alpine","bootstrap","curl","docker","docker-image","fabric8","init","init-containers","kubernetes","kubernetes-pods","netcat","postgres","wait-for-it","waiting"],"created_at":"2024-11-25T21:34:25.063Z","updated_at":"2025-10-26T09:03:43.961Z","avatar_url":"https://github.com/bokysan.png","language":"Shell","readme":"# About\n\nA basic Alpine image with a few tools to enable you to better start of your work.\n\nMostly useful for Docker and Kubernetes \n[init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/)\nas well as debugging your own containers.\n\nIf you are missing anything, send in a merge request. Let's just not overdoit, folks.\nCurrently available:\n- awk ([gawk](https://www.gnu.org/software/gawk/manual/gawk.html))\n- [bash](https://www.gnu.org/software/bash/)\n- [busybox](https://www.busybox.net) (with aliases for lots of tools...)\n- [curl](https://curl.haxx.se/) and [wget](https://www.gnu.org/software/wget/)\n- [gzip](https://www.gnu.org/software/gzip/), [bzip2](http://www.bzip.org/), and [xz](https://tukaani.org/xz/)\n- [jq](https://stedolan.github.io/jq/) A lightweight and flexible command-line JSON processor\n- [kubectl](https://kubernetes.io/docs/tasks/tools/install-kubectl/)\n- [helm](helm.sh/)\n- [libressl](https://www.libressl.org/) (openssl fork)\n- [psql](https://www.postgresql.org/docs/current/app-psql.html) - a PostgreSQL client\n- [mariadb-client](https://mariadb.com/kb/en/mysql-client/) - a PostgreSQL client\n- [sed](https://www.gnu.org/software/sed/)\n- [vim](https://www.vim.org/) (who can live without it)\n\nAWS scripts:\n- *s3* A bash script for downloading secure files from AWS s3 without the need for the full fledged AWS client\n- *ecr-get-authorization-token* A bash script for getting AWS ECR repository authorization token without the need for\n  AWS client.\n- *ecr-get-login* A script that mimics the `aws ecr get-login` output\n- *ecr-describe-repositories* is a call to [Describe Repositories](https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_DescribeRepositories.html#ECR-DescribeRepositories-request-maxResults) API\n- *esc-create-repository* is a call to [Create Repository](https://docs.aws.amazon.com/AmazonECR/latest/APIReference/API_CreateRepository.html) API\n\n# AWS\n\nThe scripts (e.g. *s3* and *get-authorization-token*) will require you set propery environment variables before\ninvoking them, namely: `AWS_ACCESS_KEY_ID`, `AWS_SECRET_ACCESS_KEY` and `AWS_REGION`. If you're an AWS user,\nyou'll know what they eman.\n\n## Usage\n\n```\nexport AWS_ACCESS_KEY_ID=xxx \nexport AWS_SECRET_ACCESS_KEY=yyy \nexport AWS_REGION=eu-central-2 \n\ns3 bucket path/file.ext \u003e file.ext\necr-get-authorization-token\n$(ect-get-login)\n```\n\n# Wait for service in Kubernetes\n\nThis image also includes a bash script `wait-for-service`, which will wait for a given service to be up before\ncontinuing. It's API/parameter compatible with \n[fabric8-dependency-wait-service](https://github.com/fabric8-services/fabric8-dependency-wait-service) but\nsince it's written in BASH and not GO:\n- the image is much smaller\n- there's no need to include different binaries for different platforms\n- more platforms are automatically supported out of the box (e.g. wherever BASH works)\n\n## Environment variables\n\nThe following variables can be used to control the service:\n\n| Variable | Possible values | Default value | Description |\n| -------- | --------------- | ------------- | ----------- |\n| `DEPENDENCY_LOG_VERBOSE` | `true`/`false` | `true` | Puts out a little extra logging into output. (like *fabric8*) |\n| `DEPENDENCY_POLL_INTERVAL` | A positive integer | 2 | The interval, in seconds, between each poll of the dependency check. (like *fabric8*) |\n| `DEPENDENCY_CONNECT_TIMEOUT` | A positive integer | 5 | How long to wait before the service timeouts, in seconds. (not possible with *fabric8*) |\n| `SCRIPT_TIMEOUT` | A positive integer | 0 | A total time the script is allowed to run. 0 means \"no timeout\" |\n\n## Usage\nThis utility is used as part of the [init containers](https://kubernetes.io/docs/concepts/workloads/pods/init-containers/). \n\nUsage:\n```\n  wait-for-service [parameters] [tcp://host:port | postgres://[user@]host[:port] | http[s]://host[:port] | ... ] [-- command args]\n\n  wait-for-service will wait for the specified service to be up and running before returning / exiting from the function.\n    It will optionally run the command(s) at the end of the line after the commnad completes successfully.\n\n    Available parameters:\n    -t | --timeout=TIMEOUT            Script timeout parameter\n    -v | --verbose                    Be verbose. \n                                      Alias for DEPENDENCY_LOG_VERBOSE=true\n    -q | --quiet                      Be quiet. \n                                      Alias for DEPENDENCY_LOG_VERBOSE=false\n    -c | --connection-timeout=TIMEOUT Timeout before the service is deemed inaccessible (default is 5 seconds).\n                                      Alias for DEPENDENCY_CONNECT_TIMEOUT\n    -p | --poll-interval=INTERVAL     Interval in seconds between polling retries.\n                                      Alias for DEPENDENCY_POLL_INTERVAL\n    -C | --colo[u]r                   Force colour output.\n\n    tcp://host:port                   Wait for the given service to be available at specified host/port. Uses Netcat.\n    postgres://[user@]host[:port]     Wait for PostgreSQL to be available. Uses pg_isready.\n    http[s]://host[:port]             Wait for HTTP(s) service to be ready. Uses curl.\n    \n    -- COMMAND ARGS                   Execute command with args after the test finishes\n```\n\nAn example is given below:\n\n```yaml\nspec:\n  initContainers:\n    - name: web-for-services\n      image: \"boky/alpine-bootstrap\"\n      command: [ 'wait-for-service', 'postgres://user@host:port', 'https://whole-url-to-service', 'tcp://host:port', ... ]\n      # Or, using the fabric8-compatible symlink\n      command: [ 'fabric8-dependency-wait-service-linux-amd64', 'postgres://user@host:port', 'https://whole-url-to-service', 'tcp://host:port', ... ]\n      env:\n        - name: DEPENDENCY_POLL_INTERVAL\n          value: \"10\"\n        - name: DEPENDENCY_LOG_VERBOSE\n          value: \"false\"\n        - name: DEPENDENCY_CONNECT_TIMEOUT\n          value: \"10\"\n```\n\n## Supported protocols\n\nThe following protocols are supported:\n* **HTTP**: Anything that starts with `http://` or `https://` is considered a HTTP protocol. \n  [curl](https://curl.haxx.se/) is used to make a `HTTP HEAD`request. Automatically falls back\n  to *TCP* check if `curl` is not available.\n  A service is considered up if:\n  * It doesn't time out\n  * It returns a result in the range `2xx`\n\n* **POSTGRES**: The syntax is: `postgres://[\u003cuser\u003e@]\u003chost\u003e[:\u003cport\u003e]`. \n  The given postgres url is parsed for username, host, and port and passed to the \n  [pg_isready](https://www.postgresql.org/docs/10/static/app-pg-isready.html) utility. \n  Automatically falls back to *TCP* check if `pg_isready` is not avaiable.\n  The db is considered up when *pg_isready returns a zero exit code*.\n* **TCP**: The syntax is: `tcp://\u003chost\u003e:\u003cport\u003e`. [Netcat](http://netcat.sourceforge.net/) is used to \n  connect to the service. Service is considered up when *netcat* successfully connects and \n  *return a zero exit code*. If `netcat` is not avaialbe, uses `/dev/tcp` to send open up a port.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbokysan%2Fdocker-alpine-bootstrap","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbokysan%2Fdocker-alpine-bootstrap","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbokysan%2Fdocker-alpine-bootstrap/lists"}