{"id":13424382,"url":"https://github.com/into-docker/into-docker","last_synced_at":"2025-12-27T12:55:46.363Z","repository":{"id":43148746,"uuid":"253002701","full_name":"into-docker/into-docker","owner":"into-docker","description":"Never write another Dockerfile","archived":false,"fork":false,"pushed_at":"2023-10-18T10:49:11.000Z","size":423,"stargazers_count":85,"open_issues_count":5,"forks_count":5,"subscribers_count":4,"default_branch":"main","last_synced_at":"2024-10-26T23:55:10.619Z","etag":null,"topics":["best-practices","builder-image","docker","multi-stage","s2i"],"latest_commit_sha":null,"homepage":"","language":"Clojure","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/into-docker.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","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},"funding":{"github":["xsc"]}},"created_at":"2020-04-04T13:22:54.000Z","updated_at":"2023-07-25T14:34:26.000Z","dependencies_parsed_at":"2024-01-14T08:07:05.904Z","dependency_job_id":null,"html_url":"https://github.com/into-docker/into-docker","commit_stats":null,"previous_names":[],"tags_count":19,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/into-docker%2Finto-docker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/into-docker%2Finto-docker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/into-docker%2Finto-docker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/into-docker%2Finto-docker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/into-docker","download_url":"https://codeload.github.com/into-docker/into-docker/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243775838,"owners_count":20346274,"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":["best-practices","builder-image","docker","multi-stage","s2i"],"created_at":"2024-07-31T00:00:53.496Z","updated_at":"2025-12-27T12:55:46.323Z","avatar_url":"https://github.com/into-docker.png","language":"Clojure","readme":"# into-docker\n\n[![Spice Program](https://img.shields.io/badge/spice_program-sponsored-brightgreen.svg?logo=data%3Aimage%2Fpng%3Bbase64%2CiVBORw0KGgoAAAANSUhEUgAAAA4AAAAPCAMAAADjyg5GAAABqlBMVEUAAAAzmTM3pEn%2FSTGhVSY4ZD43STdOXk5lSGAyhz41iz8xkz2HUCWFFhTFFRUzZDvbIB00Zzoyfj9zlHY0ZzmMfY0ydT0zjj92l3qjeR3dNSkoZp4ykEAzjT8ylUBlgj0yiT0ymECkwKjWqAyjuqcghpUykD%2BUQCKoQyAHb%2BgylkAyl0EynkEzmkA0mUA3mj86oUg7oUo8n0k%2FS%2Bw%2Fo0xBnE5BpU9Br0ZKo1ZLmFZOjEhesGljuzllqW50tH14aS14qm17mX9%2Bx4GAgUCEx02JySqOvpSXvI%2BYvp2orqmpzeGrQh%2Bsr6yssa2ttK6v0bKxMBy01bm4zLu5yry7yb29x77BzMPCxsLEzMXFxsXGx8fI3PLJ08vKysrKy8rL2s3MzczOH8LR0dHW19bX19fZ2dna2trc3Nzd3d3d3t3f39%2FgtZTg4ODi4uLj4%2BPlGxLl5eXm5ubnRzPn5%2Bfo6Ojp6enqfmzq6urr6%2Bvt7e3t7u3uDwvugwbu7u7v6Obv8fDz8%2FP09PT2igP29vb4%2BPj6y376%2Bu%2F7%2Bfv9%2Ff39%2Fv3%2BkAH%2FAwf%2FtwD%2F9wCyh1KfAAAAKXRSTlMABQ4VGykqLjVCTVNgdXuHj5Kaq62vt77ExNPX2%2Bju8vX6%2Bvr7%2FP7%2B%2FiiUMfUAAADTSURBVAjXBcFRTsIwHAfgX%2FtvOyjdYDUsRkFjTIwkPvjiOTyX9%2FAIJt7BF570BopEdHOOstHS%2BX0s439RGwnfuB5gSFOZAgDqjQOBivtGkCc7j%2B2e8XNzefWSu%2BsZUD1QfoTq0y6mZsUSvIkRoGYnHu6Yc63pDCjiSNE2kYLdCUAWVmK4zsxzO%2BQQFxNs5b479NHXopkbWX9U3PAwWAVSY%2FpZf1udQ7rfUpQ1CzurDPpwo16Ff2cMWjuFHX9qCV0Y0Ok4Jvh63IABUNnktl%2B6sgP%2BARIxSrT%2FMhLlAAAAAElFTkSuQmCC)](https://spiceprogram.org)\n[![Release](https://img.shields.io/github/v/release/into-docker/into-docker?sort=semver)](https://github.com/into-docker/into-docker/releases/latest)\n[![CI](https://github.com/into-docker/into-docker/workflows/CI/badge.svg)](https://github.com/into-docker/into-docker/actions?query=workflow%3ACI)\n[![Code Coverage](https://codecov.io/gh/into-docker/into-docker/branch/main/graph/badge.svg)](https://codecov.io/gh/into-docker/into-docker)\n\n**into-docker** lets you build and run applications relying on common frameworks\nor build tools without ever having to write another Dockerfile. It allows you to\nbundle up your build environments and processes for others to reuse.\n\nThis tool is inspired by [`s2i`][s2i] and shares some concepts, ideas and goals.\nHowever, it targets one specific use case, the classic\n[multi-stage][multi-stage] build where artifacts are created in a _fat_ build\nenvironment before being injected into a _leaner_ runner environment.\n\nCheck out the [whitepaper][] for more details!\n\n[whitepaper]: doc/WHITEPAPER.md\n\n## Demo\n\n[![asciicast](https://asciinema.org/a/450632.svg)](https://asciinema.org/a/450632)\n\n## Goals\n\n- **Minimum-configuration builds**: Rather than providing infinite ways to\n  configure your builds, we encourage the use of defaults and rely on\n  convention over configuration when creating builder images.\n- **Promote best practices**: Instead of creating a multitude of Docker images\n  of varying quality, developers can benefit from the work of the community in\n  a non-copy/paste fashion. This includes [image labels][oci] and automatic\n  application of [ignore rules][di].\n- **Reproducible builds**: By packaging your build environment as a Docker\n  image, it can be versioned just like your source code. The same builder image\n  should, given a specific set of inputs, always produce the same output.\n- **Small footprint**: Images created by this tool will only differ in one layer\n  from the base image, reducing bandwidth usage when pushing and pulling similar\n  images.\n- **Compliance**: As maintainer of a build platform you can curate a list of\n  official build environments. Not only do platform users no longer have to\n  write their own Dockerfile - they easily benefit from updates and patches\n  to the build environment.\n- **Control the execution environment**: Everything above also applies to runner\n  images, allowing platform users to benefit from improvements to the execution\n  environment while complying with regulations and best practices.\n\n## Installation\n\nUsing [Homebrew][homebrew]:\n\n```sh\nbrew install into-docker/brew/into-docker\n```\n\nAll releases can be found on the [Releases][releases] page.\n\n[homebrew]: https://brew.sh\n[releases]: https://github.com/into-docker/into-docker/releases\n\n## Usage\n\nMake sure to have [docker engine][docker-engine] running on your machine!\n\n[docker-engine]: https://docs.docker.com/engine/install/\n\n### Run Build\n\nTo build local sources using an into-docker builder image use the `build` command\nand supply the desired target image name and tag:\n\n```sh\ninto build -t \u003cname:tag\u003e \u003cbuilder\u003e [\u003cpath\u003e]\n```\n\nLearn how to [create your own builder image][builder-images] or check out\n[existing builder images][gh-builder-images] on Github.\n\n[gh-builder-images]: https://github.com/topics/into-docker-builder-image\n\n### Build Profiles\n\nBuilder images can supply multiple _build profiles_ to allow for fine-tuning of\nthe build process. This could, for example, allow you to use the same builder\nimage for your React application whether you're relying on `npm` or `yarn`.\n\nYou can choose a build profile using the `-p`/`--profile` command line argument:\n\n```sh\ninto build -t \u003cname:tag\u003e -p \u003cprofile\u003e \u003cbuilder\u003e\n```\n\nLearn how to [add build profiles to your builder image][build-profiles].\n\n### Caching\n\nRepeated builds of the same codebase can usually be sped up by caching\nintermediate build results like downloaded dependencies. By default, `into` runs\na fresh build each time but by supplying the `--cache` command line argument a\ncache archive (tar+gzip) will be created at the desired path.\n\n```sh\ninto build -t \u003cname:tag\u003e --cache \u003cpath\u003e \u003cbuilder\u003e\n```\n\nSubsequent builds will use the archive (if it exists) to seed the builder\ncontainer.\n\nAlternatively, you can rely on a Docker volume for caching. This is an\n**experimental** feature and most useful for iterating on builds locally. Note\nthat you'll be responsible yourself for cleaning up the volume.\n\n```sh\ninto build -t \u003cname:tag\u003e --incremental \u003cbuilder\u003e\n```\n\nLearn how to [add caching to your builder image][builder-caching].\n\n### Build Artifacts\n\nAn into-docker build consists of two stages: build and assemble. To access the\nartifacts created by the build stage you can write them to a path of your\nchoice using the `--write-artifacts` flag:\n\n```sh\ninto build --write-artifacts \u003ctarget-path\u003e \u003cbuilder\u003e [\u003cpath\u003e]\n```\n\nIf you omit the `-t`/`--tag` flag, only the artifacts will be created, no Docker\nimage.\n\n### Secrets (experimental)\n\nWhen using e.g. private artifact registries, passing environment variables to\nyour build tooling is usually the best way to provide credentials. To do this\nwith into-docker, create a file `.buildenv` in your source directory that\ncontains the _names_ of the variables you want to pass.\n\nWhen running a build, those values will be imported from your shell's\nenvironment and made available to the build script:\n\n```sh\necho \"SECRET_PASSWORD\" \u003e \".buildenv\"\nexport SECRET_PASSWORD=12345\ninto build ...\n```\n\nYou can read about the mechanism (and the rationale) in the\n[WHITEPAPER][buildenv].\n\n### Platforms\n\nIf you're [targeting multiple platforms][docker-arch] or platforms different\nfrom your build machine, you can use the `--platform` CLI options:\n\n```sh\ninto build -t \u003cname:tag\u003e --platform linux/arm64 \u003cbuilder\u003e\n```\n\nBy default, this will only impact the target image - the build itself will be\nrun on your host's platform. You can use the environment variable\n`DOCKER_DEFAULT_PLATFORM` to adapt the builder container's platform. Check out\nthe [WHITEPAPER][platforms] for more insights.\n\n[di]: https://codefresh.io/docker-tutorial/not-ignore-dockerignore-2/\n[oci]: https://github.com/opencontainers/image-spec/blob/master/annotations.md\n[s2i]: https://github.com/openshift/source-to-image\n[multi-stage]: https://docs.docker.com/develop/develop-images/multistage-build/\n[builder-images]: doc/WHITEPAPER.md#builder-images\n[build-profiles]: doc/WHITEPAPER.md#build-profiles\n[builder-caching]: doc/WHITEPAPER.md#caching\n[buildenv]: doc/WHITEPAPER.md#user-provided-environment-variables\n[platforms]: doc/WHITEPAPER.md#platforms\n[docker-arch]: https://docs.docker.com/desktop/multi-arch/\n\n## Usage on CI\n\nDue to the minimal-configuration approach of into-docker, it can be easily used\non the CI environment of your choice. Check out the following pre-packaged build\nsteps:\n\n- [Github Actions](https://github.com/marketplace/actions/into-docker)\n\nUse the `--ci` flag to direct the CLI tool to use CI-specific assumptions when\nbuilding images. This allows you, for example, to use environment variables to\nfill image labels.\n\nCheck out the `into.build.ci` namespace if you want to add more environments.\n\n## License\n\n```\nMIT License\n\nCopyright (c) 2020-2023 Yannick Scherer\n\nPermission is hereby granted, free of charge, to any person obtaining a copy\nof this software and associated documentation files (the \"Software\"), to deal\nin the Software without restriction, including without limitation the rights\nto use, copy, modify, merge, publish, distribute, sublicense, and/or sell\ncopies of the Software, and to permit persons to whom the Software is\nfurnished to do so, subject to the following conditions:\n\nThe above copyright notice and this permission notice shall be included in all\ncopies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\nIMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\nFITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\nAUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\nLIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\nOUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\nSOFTWARE.\n```\n","funding_links":["https://github.com/sponsors/xsc"],"categories":["Clojure"],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finto-docker%2Finto-docker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finto-docker%2Finto-docker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finto-docker%2Finto-docker/lists"}