{"id":16883024,"url":"https://github.com/tsaarni/docker-deb-builder","last_synced_at":"2025-08-20T18:34:00.974Z","repository":{"id":46315628,"uuid":"88755792","full_name":"tsaarni/docker-deb-builder","owner":"tsaarni","description":"Tutorial on how to use Docker to build Debian packages","archived":false,"fork":false,"pushed_at":"2024-05-20T06:08:11.000Z","size":11,"stargazers_count":117,"open_issues_count":1,"forks_count":47,"subscribers_count":10,"default_branch":"master","last_synced_at":"2024-12-12T09:10:27.205Z","etag":null,"topics":["debian-packaging","docker"],"latest_commit_sha":null,"homepage":null,"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/tsaarni.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":"2017-04-19T14:39:52.000Z","updated_at":"2024-10-31T10:30:42.000Z","dependencies_parsed_at":"2024-05-20T07:26:51.707Z","dependency_job_id":"364b90ec-2029-4a95-8cff-91b03edd07d7","html_url":"https://github.com/tsaarni/docker-deb-builder","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/tsaarni%2Fdocker-deb-builder","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsaarni%2Fdocker-deb-builder/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsaarni%2Fdocker-deb-builder/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tsaarni%2Fdocker-deb-builder/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tsaarni","download_url":"https://codeload.github.com/tsaarni/docker-deb-builder/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":230445927,"owners_count":18227060,"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":["debian-packaging","docker"],"created_at":"2024-10-13T16:10:03.353Z","updated_at":"2024-12-19T14:08:10.714Z","avatar_url":"https://github.com/tsaarni.png","language":"Shell","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Creating Debian packages in Docker container\n\n## Overview\n\nDocker can be used to set up a clean build environment for Debian\npackaging.  This tutorial shows how to create a container with\nrequired build tools and how to use it to build packages.\n\nFor more complete solution with many improvements see\n[container-deb-builder](https://github.com/cgzones/container-deb-builder/).\n\nYou might also be interested in [debcraft](https://salsa.debian.org/otto/debcraft), which offers an easy, fast, and secure way to build Debian packages.\n\n## Create build environment\n\nStart by building a container that will act as package build environment:\n\n    docker build -t docker-deb-builder:17.04 -f Dockerfile-ubuntu-17.04 .\n\nIn this example the target is Ubuntu 17.04 but you can create and\nmodify `Dockerfile-nnn` to match your target environment.\n\n## Building packages\n\nFirst download or git clone the source code of the package you are\nbuilding:\n\n    git clone ... ~/my-package-source\n\nThe source code should contain subdirectory called `debian` with at\nleast a minimum set of packaging files: `control`, `copyright`,\n`changelog` and `rules`.\n\nClone the\n[docker-deb-builder](https://github.com/tsaarni/docker-deb-builder)\n(the repository you are reading now) and run the build script to see\nusage:\n\n    $ ./build\n    usage: build [options...] SOURCEDIR\n    Options:\n      -i IMAGE  Name of the docker image (including tag) to use as package build environment.\n      -o DIR    Destination directory to store packages to.\n      -d DIR    Directory that contains other deb packages that need to be installed before build.\n\nTo build Debian packages run following commands:\n\n    # create destination directory to store the build results\n    mkdir output\n\n    # build package from source directory\n    ./build -i docker-deb-builder:17.04 -o output ~/my-package-source\n\nAfter successful build you will find the `.deb` files in `output`\ndirectory.\n\nSometimes build might require dependencies that cannot be installed with\n`apt-get build-dep`.  You can install them into the build environment\nby passing option `-d DIR` where DIR is a directory with `*.deb` files\nin it.\n\n    ./build -i docker-deb-builder:17.04 -o output -d dependencies ~/my-package-source\n\n## Integrating with CI\n\nIn this tutorial all package-specific build dependencies are installed\nfrom scratch each time build is executed in the container.  The\nbenefit is that the container is generic and reusable for building any\npackage but the installation of build-time dependencies can add up to\nconsiderable overhead, both in time and bandwidth.  This overhead may\nnot be acceptable when building packages as part of continuous\nintegration pipeline.  One possible solution to reduce overhead is to\ninstall package-specific build dependencies into build environment\ncontainer.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsaarni%2Fdocker-deb-builder","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftsaarni%2Fdocker-deb-builder","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftsaarni%2Fdocker-deb-builder/lists"}