{"id":20619369,"url":"https://github.com/containerscrew/infratools","last_synced_at":"2025-06-15T15:32:37.209Z","repository":{"id":230396595,"uuid":"774355279","full_name":"containerscrew/infratools","owner":"containerscrew","description":"Container image with infra tools (terraform, terragrunt, aws cli, helm, kubectl...). Useful for CI/CD. ","archived":false,"fork":false,"pushed_at":"2025-03-06T17:15:23.000Z","size":471,"stargazers_count":2,"open_issues_count":0,"forks_count":1,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-03-28T19:53:42.838Z","etag":null,"topics":["alpine","awscliv2","cd","ci","ci-cd","helm","k8s","terraform","terragrunt","tftools"],"latest_commit_sha":null,"homepage":"","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/containerscrew.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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":"2024-03-19T12:05:41.000Z","updated_at":"2025-03-06T17:15:27.000Z","dependencies_parsed_at":"2024-03-29T13:37:28.090Z","dependency_job_id":"23312653-03be-402f-8225-621b09c59842","html_url":"https://github.com/containerscrew/infratools","commit_stats":null,"previous_names":["containerscrew/infratools"],"tags_count":34,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containerscrew%2Finfratools","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containerscrew%2Finfratools/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containerscrew%2Finfratools/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/containerscrew%2Finfratools/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/containerscrew","download_url":"https://codeload.github.com/containerscrew/infratools/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":249067775,"owners_count":21207395,"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","awscliv2","cd","ci","ci-cd","helm","k8s","terraform","terragrunt","tftools"],"created_at":"2024-11-16T12:11:29.569Z","updated_at":"2025-04-15T11:55:07.333Z","avatar_url":"https://github.com/containerscrew.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cp align=\"center\" \u003e\n    \u003cimg src=\"logo.png\" alt=\"logo\" width=\"250\"/\u003e\n\u003ch3 align=\"center\"\u003einfratools\u003c/h3\u003e\n\u003cp align=\"center\"\u003eContainer image with infra tools (terraform, terragrunt, aws cli, helm, kubectl...). Useful for CI/CD.\u003c/p\u003e\n\u003c/p\u003e\n\n\u003c!-- START OF TOC !DO NOT EDIT THIS CONTENT MANUALLY--\u003e\n**Table of Contents**  *generated with [mtoc](https://github.com/containerscrew/mtoc)*\n- [Badges](#badges)\n- [About](#about)\n- [Architecture](#architecture)\n- [Main tools](#main-tools)\n- [Versioning](#versioning)\n- [Installing python libraries](#installing-python-libraries)\n  - [Use pipx to install python packages/libraries](#use-pipx-to-install-python-packages/libraries)\n  - [Use venv](#use-venv)\n  - [Force installation with pip3](#force-installation-with-pip3)\n- [Global gitconfig for internal git servers with self signed certificate](#global-gitconfig-for-internal-git-servers-with-self-signed-certificate)\n- [Lint](#lint)\n- [Image security scan with Trivy](#image-security-scan-with-trivy)\n  - [Local trivy scan](#local-trivy-scan)\n- [Local dev](#local-dev)\n- [Using `run.sh` script (Recommended)](#using-`run.sh`-script-(recommended))\n- [TODO](#todo)\n- [CHANGELOG](#changelog)\n- [LICENSE](#license)\n\u003c!-- END OF TOC --\u003e\n\n![example](./example.png)\n\n# Badges\n\n[![Build and scan 🕷️📦](https://github.com/containerscrew/infratools/actions/workflows/build.yml/badge.svg)](https://github.com/containerscrew/infratools/actions/workflows/build.yml)\n![Hadolint](https://github.com/containerscrew/infratools/actions/workflows/hadolint.yml/badge.svg)\n[![License](https://img.shields.io/github/license/containerscrew/infratools)](/LICENSE)\n![Latest Tag](https://img.shields.io/github/v/tag/containerscrew/infratools?sort=semver)\n\n[![DockerHub Badge](http://dockeri.co/image/containerscrew/infratools)](https://hub.docker.com/r/containerscrew/infratools/)\n\n\n#  About\n\nHow many times do you need a container image with tools like `terraform, helm, kubectl, aws cli, terragrunt`... among many others? Aren't you tired of having to maintain all of them in each repository, instead of having one **\"general\"** one that can be used in multiple repos?\n\n**Available tags:** https://hub.docker.com/r/containerscrew/infratools/tags\n\n# Architecture\n\n| Arch    | Supported | Tested |\n|---------|----------|--------|\n| amd64   | ✅        | ✅        |\n| arm64   | ✅         | ✅         |\n\n# Main tools\n\n| Tool                                                 | Available |\n|------------------------------------------------------|----------|\n| Terraform                                            |   ✅      |\n| Terragrunt                                           |   ✅      |\n| Kubectl                                              |   ✅      |\n| Helm                                                 |   ✅      |\n| AWS CLI                                              |   ✅      |\n| [tftools](https://github.com/containerscrew/tftools) |   ✅      |\n| [tfenv](https://github.com/tfutils/tfenv)   |   ✅      |\n| [ohmyzsh](https://ohmyz.sh/)   |   ✅      |\n\nTake a look to all the available installed tools inside the [Dockerfile](./Dockerfile)\n\n\u003e [!TIP]\n\u003e You can change `terraform` version dynamically using `tfenv` or setting `.terraform-version` file in your repository.\n\n\n# Versioning\n\n* Alpine core packages: https://pkgs.alpinelinux.org/packages\n* AWS cli v2 is installed directly from official alpine repository. If you need to look for other version, [visit this page](https://pkgs.alpinelinux.org/packages?name=aws-cli\u0026branch=edge\u0026repo=\u0026arch=\u0026maintainer=)\n* For every new version, a new git tag will be created. You can see versioning inside [Dockerfile](./Dockerfile)\n\n\n# Installing python libraries\n\n\u003cdetails\u003e\n\u003csummary\u003eIf you try to install python libraries using `pip3`, you will see the following error:\u003c/summary\u003e\n\u003cbr\u003e\nError:\n\u003cbr\u003e\u003cbr\u003e\n\u003cpre\u003e\n× This environment is externally managed\n╰─\u003e\n    The system-wide python installation should be maintained using the system\n    package manager (apk) only.\n\n    If the package in question is not packaged already (and hence installable via\n    \"apk add py3-somepackage\"), please consider installing it inside a virtual\n    environment, e.g.:\n\n    python3 -m venv /path/to/venv\n    . /path/to/venv/bin/activate\n    pip install mypackage\n\n    To exit the virtual environment, run:\n\n    deactivate\n\n    The virtual environment is not deleted, and can be re-entered by re-sourcing\n    the activate file.\n\n    To automatically manage virtual environments, consider using pipx (from the\n    pipx package).\n\nnote: If you believe this is a mistake, please contact your Python installation or OS distribution provider. You can override this, at the risk of breaking your Python installation or OS, by passing --break-system-packages.\nhint: See PEP 668 for the detailed specification.\n\u003c/pre\u003e\n\u003c/details\u003e\n\n## Use pipx to install python packages/libraries\n\nInstall library + deps:\n\n```shell\npipx install boto3 --include-deps\n```\n\nInstall a package:\n\n```shell\npipx install your-package-name # visit pypip\n```\n\n## Use venv\n\n```shell\npython3 -m venv /path/to/venv\n. /path/to/venv/bin/activate\npip3 install mypackage\n```\n\n## Force installation with pip3\n\n```shell\npip3 install boto3 --break-system-packages\n```\n\n# Global gitconfig for internal git servers with self signed certificate\n\nIf using custom git repository with self signed certificate, just edit in your `~/.gitconfig`:\n\n```bash\n[http \"https://gitlab.server.internal\"]\n  ##################################\n  # Self Signed Server Certificate #\n  ##################################\n\n  sslCAInfo = /path/to/your/certificate.crt\n  #sslCAPath = /path/to/selfCA/\n  sslVerify = true # or set to false if you trust\n```\n\n# Lint\n\n```shell\nmake hadolint\n```\n\n# Image security scan with Trivy\n\nThis image uses [trivy github action](https://github.com/aquasecurity/trivy-action) as a tool for security scanning.\n\nTake a look to the [official repo](https://github.com/aquasecurity/trivy) of Trivy.\n\n## Local trivy scan\n\n[Install trivy](https://aquasecurity.github.io/trivy/test/getting-started/installation/)\n\n```shell\nmake build-image\nmake trivy-scan # trivy image docker.io/containerscrew/infratools:test\n```\n\n# Local dev\n\n```shell\nmake local-build\nmake local-run\n# Or all in one\nmake local-build-run\n```\n\n\u003e Use other version([tag](https://github.com/containerscrew/infratools/tags)) if needed (edit the Makefile).\n\n# Using `run.sh` script (Recommended)\n\nCreate a copy of the script [`run.sh`](./run.sh) in your repository and run it.\n\n```shell\n./run.sh\nUsage: ./run.sh [-i (info)] [-u (update)] [-a (attach)]\n```\n\nWith this script, you can run the container or attach to an existing, update the container to the latest tag version, or get the current version of the container.\n\n\u003e [!IMPORTANT]\n\u003e Running this script, ZSH history will be saved in /code repository to allow persistent command history.\n\u003e So, If you don't want to push the .zsh_history to git, add the file to `.gitignore` in the repo you are using.\n\n\n# TODO\n\n* Add other dynamic version switchers for other tools (tgswitch, kubectl...)\n* Seperate pipeline for build release + build in other branch\n\n# CHANGELOG\n\n[`CHANGELOG.md`](./CHANGELOG.md)\n\n# LICENSE\n\n[`LICENSE`](./LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontainerscrew%2Finfratools","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcontainerscrew%2Finfratools","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcontainerscrew%2Finfratools/lists"}