Skip to content

docker/packaging

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Docker Packaging

πŸ§ͺ Work in progress

This repository is considered EXPERIMENTAL and under active development until further notice. Please refer to docker-ce-packaging repository to request changes to the packaging process.

About

This repository creates packages (apk, deb, rpm, static) for various projects and are published as a Docker image on Docker Hub.


Release

Packages are published to Docker Hub as non-runnable images that only contains the artifacts. You can check the GitHub Releases for the list of published Docker tags.

Note

We are also publishing nightly builds using the nightly-<project>-<version> tags.

For testing purpose you can use a tool like Undock to extract packages:

# extract packages for all platforms and output to ./bin/undock folder
$ undock --wrap --rm-dist --all dockereng/packaging:buildx-v0.9.1 ./bin/undock
tree ./bin/undock
./buildx/v0.9.1/
β”œβ”€β”€ centos
β”‚   β”œβ”€β”€ 7
β”‚   β”‚   β”œβ”€β”€ amd64
β”‚   β”‚   β”‚   └── docker-buildx-plugin-0.9.1-1.el7.x86_64.rpm
β”‚   β”‚   └── arm64
β”‚   β”‚       └── docker-buildx-plugin-0.9.1-1.el7.aarch64.rpm
β”‚   β”œβ”€β”€ 8
β”‚   β”‚   β”œβ”€β”€ amd64
β”‚   β”‚   β”‚   └── docker-buildx-plugin-0.9.1-1.el8.x86_64.rpm
β”‚   β”‚   └── arm64
β”‚   β”‚       └── docker-buildx-plugin-0.9.1-1.el8.aarch64.rpm
β”‚   └── 9
β”‚       β”œβ”€β”€ amd64
β”‚       β”‚   └── docker-buildx-plugin-0.9.1-1.el9.x86_64.rpm
β”‚       └── arm64
β”‚           └── docker-buildx-plugin-0.9.1-1.el9.aarch64.rpm
β”œβ”€β”€ debian
β”‚   β”œβ”€β”€ bullseye
β”‚   β”‚   β”œβ”€β”€ amd64
β”‚   β”‚   β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_amd64.buildinfo
β”‚   β”‚   β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_amd64.changes
β”‚   β”‚   β”‚   └── docker-buildx-plugin_0.9.1-0_amd64.deb
β”‚   β”‚   β”œβ”€β”€ arm
β”‚   β”‚   β”‚   β”œβ”€β”€ v6
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armel.buildinfo
β”‚   β”‚   β”‚   β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armel.changes
β”‚   β”‚   β”‚   β”‚   └── docker-buildx-plugin_0.9.1-0_armel.deb
β”‚   β”‚   β”‚   └── v7
β”‚   β”‚   β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armhf.buildinfo
β”‚   β”‚   β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armhf.changes
β”‚   β”‚   β”‚       └── docker-buildx-plugin_0.9.1-0_armhf.deb
β”‚   β”‚   β”œβ”€β”€ arm64
β”‚   β”‚   β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_arm64.buildinfo
β”‚   β”‚   β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_arm64.changes
β”‚   β”‚   β”‚   └── docker-buildx-plugin_0.9.1-0_arm64.deb
β”‚   β”‚   └── s390x
β”‚   β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_s390x.buildinfo
β”‚   β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_s390x.changes
β”‚   β”‚       └── docker-buildx-plugin_0.9.1-0_s390x.deb
β”‚   └── buster
β”‚       β”œβ”€β”€ amd64
β”‚       β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_amd64.buildinfo
β”‚       β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_amd64.changes
β”‚       β”‚   └── docker-buildx-plugin_0.9.1-0_amd64.deb
β”‚       β”œβ”€β”€ arm
β”‚       β”‚   └── v7
β”‚       β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armhf.buildinfo
β”‚       β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armhf.changes
β”‚       β”‚       └── docker-buildx-plugin_0.9.1-0_armhf.deb
β”‚       └── arm64
β”‚           β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_arm64.buildinfo
β”‚           β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_arm64.changes
β”‚           └── docker-buildx-plugin_0.9.1-0_arm64.deb
β”œβ”€β”€ fedora
β”‚   β”œβ”€β”€ 35
β”‚   β”‚   β”œβ”€β”€ amd64
β”‚   β”‚   β”‚   └── docker-buildx-plugin-0.9.1-1.fc35.x86_64.rpm
β”‚   β”‚   β”œβ”€β”€ arm64
β”‚   β”‚   β”‚   └── docker-buildx-plugin-0.9.1-1.fc35.aarch64.rpm
β”‚   β”‚   └── s390x
β”‚   β”‚       └── docker-buildx-plugin-0.9.1-1.fc35.s390x.rpm
β”‚   β”œβ”€β”€ 36
β”‚   β”‚   β”œβ”€β”€ amd64
β”‚   β”‚   β”‚   └── docker-buildx-plugin-0.9.1-1.fc36.x86_64.rpm
β”‚   β”‚   β”œβ”€β”€ arm64
β”‚   β”‚   β”‚   └── docker-buildx-plugin-0.9.1-1.fc36.aarch64.rpm
β”‚   β”‚   └── s390x
β”‚   β”‚       └── docker-buildx-plugin-0.9.1-1.fc36.s390x.rpm
β”‚   └── 37
β”‚       β”œβ”€β”€ amd64
β”‚       β”‚   └── docker-buildx-plugin-0.9.1-1.fc37.x86_64.rpm
β”‚       β”œβ”€β”€ arm64
β”‚       β”‚   └── docker-buildx-plugin-0.9.1-1.fc37.aarch64.rpm
β”‚       └── s390x
β”‚           └── docker-buildx-plugin-0.9.1-1.fc37.s390x.rpm
β”œβ”€β”€ oraclelinux
β”‚   β”œβ”€β”€ 7
β”‚   β”‚   β”œβ”€β”€ amd64
β”‚   β”‚   β”‚   └── docker-buildx-plugin-0.9.1-1.el7.x86_64.rpm
β”‚   β”‚   └── arm64
β”‚   β”‚       └── docker-buildx-plugin-0.9.1-1.el7.aarch64.rpm
β”‚   β”œβ”€β”€ 8
β”‚   β”‚   β”œβ”€β”€ amd64
β”‚   β”‚   β”‚   └── docker-buildx-plugin-0.9.1-1.el8.x86_64.rpm
β”‚   β”‚   └── arm64
β”‚   β”‚       └── docker-buildx-plugin-0.9.1-1.el8.aarch64.rpm
β”‚   └── 9
β”‚       β”œβ”€β”€ amd64
β”‚       β”‚   └── docker-buildx-plugin-0.9.1-1.el9.x86_64.rpm
β”‚       └── arm64
β”‚           └── docker-buildx-plugin-0.9.1-1.el9.aarch64.rpm
β”œβ”€β”€ raspbian
β”‚   β”œβ”€β”€ bullseye
β”‚   β”‚   └── arm
β”‚   β”‚       └── v7
β”‚   β”‚           β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armhf.buildinfo
β”‚   β”‚           β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armhf.changes
β”‚   β”‚           └── docker-buildx-plugin_0.9.1-0_armhf.deb
β”‚   └── buster
β”‚       └── arm
β”‚           └── v7
β”‚               β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armhf.buildinfo
β”‚               β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armhf.changes
β”‚               └── docker-buildx-plugin_0.9.1-0_armhf.deb
β”œβ”€β”€ static
β”‚   β”œβ”€β”€ darwin
β”‚   β”‚   β”œβ”€β”€ amd64
β”‚   β”‚   β”‚   └── docker-buildx-plugin_0.9.1.tgz
β”‚   β”‚   └── arm64
β”‚   β”‚       └── docker-buildx-plugin_0.9.1.tgz
β”‚   β”œβ”€β”€ linux
β”‚   β”‚   β”œβ”€β”€ amd64
β”‚   β”‚   β”‚   └── docker-buildx-plugin_0.9.1.tgz
β”‚   β”‚   β”œβ”€β”€ arm
β”‚   β”‚   β”‚   β”œβ”€β”€ v6
β”‚   β”‚   β”‚   β”‚   └── docker-buildx-plugin_0.9.1.tgz
β”‚   β”‚   β”‚   └── v7
β”‚   β”‚   β”‚       └── docker-buildx-plugin_0.9.1.tgz
β”‚   β”‚   β”œβ”€β”€ arm64
β”‚   β”‚   β”‚   └── docker-buildx-plugin_0.9.1.tgz
β”‚   β”‚   β”œβ”€β”€ riscv64
β”‚   β”‚   β”‚   └── docker-buildx-plugin_0.9.1.tgz
β”‚   β”‚   └── s390x
β”‚   β”‚       └── docker-buildx-plugin_0.9.1.tgz
β”‚   └── windows
β”‚       β”œβ”€β”€ amd64
β”‚       β”‚   └── docker-buildx-plugin_0.9.1.zip
β”‚       └── arm64
β”‚           └── docker-buildx-plugin_0.9.1.zip
└── ubuntu
    β”œβ”€β”€ bionic
    β”‚   β”œβ”€β”€ amd64
    β”‚   β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_amd64.buildinfo
    β”‚   β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_amd64.changes
    β”‚   β”‚   └── docker-buildx-plugin_0.9.1-0_amd64.deb
    β”‚   β”œβ”€β”€ arm
    β”‚   β”‚   └── v7
    β”‚   β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armhf.buildinfo
    β”‚   β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armhf.changes
    β”‚   β”‚       └── docker-buildx-plugin_0.9.1-0_armhf.deb
    β”‚   β”œβ”€β”€ arm64
    β”‚   β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_arm64.buildinfo
    β”‚   β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_arm64.changes
    β”‚   β”‚   └── docker-buildx-plugin_0.9.1-0_arm64.deb
    β”‚   └── s390x
    β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_s390x.buildinfo
    β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_s390x.changes
    β”‚       └── docker-buildx-plugin_0.9.1-0_s390x.deb
    β”œβ”€β”€ focal
    β”‚   β”œβ”€β”€ amd64
    β”‚   β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_amd64.buildinfo
    β”‚   β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_amd64.changes
    β”‚   β”‚   └── docker-buildx-plugin_0.9.1-0_amd64.deb
    β”‚   β”œβ”€β”€ arm
    β”‚   β”‚   └── v7
    β”‚   β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armhf.buildinfo
    β”‚   β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armhf.changes
    β”‚   β”‚       └── docker-buildx-plugin_0.9.1-0_armhf.deb
    β”‚   β”œβ”€β”€ arm64
    β”‚   β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_arm64.buildinfo
    β”‚   β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_arm64.changes
    β”‚   β”‚   └── docker-buildx-plugin_0.9.1-0_arm64.deb
    β”‚   └── s390x
    β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_s390x.buildinfo
    β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_s390x.changes
    β”‚       └── docker-buildx-plugin_0.9.1-0_s390x.deb
    └── jammy
        β”œβ”€β”€ amd64
        β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_amd64.buildinfo
        β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_amd64.changes
        β”‚   └── docker-buildx-plugin_0.9.1-0_amd64.deb
        β”œβ”€β”€ arm
        β”‚   └── v7
        β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armhf.buildinfo
        β”‚       β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_armhf.changes
        β”‚       └── docker-buildx-plugin_0.9.1-0_armhf.deb
        β”œβ”€β”€ arm64
        β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_arm64.buildinfo
        β”‚   β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_arm64.changes
        β”‚   └── docker-buildx-plugin_0.9.1-0_arm64.deb
        └── s390x
            β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_s390x.buildinfo
            β”œβ”€β”€ docker-buildx-plugin_0.9.1-0_s390x.changes
            └── docker-buildx-plugin_0.9.1-0_s390x.deb

87 directories, 97 files

Build

Requirements

Before building packages, you need to use a compatible Buildx driver to be able to build multi-plaform packages such as docker-container:

# create docker-container builder and use it by default
# https://docs.docker.com/build/building/drivers/docker-container/
$ docker buildx create --driver docker-container --name mybuilder --use --bootstrap

Note

Some packages don't have cross-compilation support and therefore QEMU will be used. As it can be slow, it is recommended to use a builder with native nodes like we do in CI. See "Set up remote builders" step for more details.

If you just want to build packages for the current platform, you can set LOCAL_PLATFORM=1 environment variable.

Usage

common folder contains helpers that will be used by the main Makefile and also across projects in pkg folder like the list of supported apk, deb and rpm releases to produce.

Makefile contains targets to build specific or all packages and will output to ./bin folder.

# build debian packages for buildx project
$ make deb-buildx
# build deb and rpm packages for all projects
$ make deb rpm
# build deb and rpm packages for all projects (only local platform)
$ LOCAL_PLATFORM=1 make deb rpm

Each project has also its own Makefile, Dockerfile and bake definition to build and push packages.

$ cd pkg/buildx/
# build all packages
$ make
# build all debian packages
$ make pkg-deb
# build debian bullseye packages
$ make run-pkg-debian11
# build centos 7 packages
$ make run-pkg-centos7

To create a new release of Buildx v0.9.1:

# build all packages for buildx v0.9.1 and output to ./bin folder
$ cd pkg/buildx/ 
$ BUILDX_REF=v0.9.1 make
# build and push image to dockereng/packaging:buildx-v0.9.1 using bake.
# "release" target will use the "bin" folder as named context to create the
# image with artifacts previously built with make.
$ docker buildx bake --push --set *.tags=dockereng/packaging:buildx-v0.9.1 release

Contributing

Want to contribute? Awesome! You can find information about contributing to this project in the CONTRIBUTING.md