docker-ce-packaging icon indicating copy to clipboard operation
docker-ce-packaging copied to clipboard

[DO NOT MERGE] WIP Test to build artefacts in the Dockerfile

Open thaJeztah opened this issue 6 years ago • 0 comments

Just some dirty hacking to see what would be needed to build the binaries as part of docker build, instead of in the deb/rpm specific tools. Still lots of work to be done to make this a usable approach, but doesn't hurt to give it a quick try.

Try building as an image

make \
  UBUNTU_VERSIONS=ubuntu-bionic \
  DEBIAN_VERSIONS="" \
  deb

Note that we didn't build containerd or runc, so we can't run the daemon. We can try the cli against a daemon on the host though;

docker run -it --rm -v /var/run/docker.sock:/var/run/docker.sock debbuild-ubuntu-bionic/x86_64

Try building, and put binaries in deb/build

make \
  UBUNTU_VERSIONS=ubuntu-bionic \
  DEBIAN_VERSIONS="" \
  binaries

Artefacts will be stored in deb/build

ls -la deb/build
total 0
drwx------   6 sebastiaan  staff  192 Oct 28 16:17 .
drwxr-xr-x  19 sebastiaan  staff  608 Oct 28 16:17 ..
drwxr-xr-x   7 sebastiaan  staff  224 Oct 28 16:17 bin
drwxr-xr-x   4 sebastiaan  staff  128 Oct 28 16:17 cli-plugins
drwxr-xr-x   6 sebastiaan  staff  192 Oct 28 16:17 completion
drwxr-xr-x   3 sebastiaan  staff   96 Oct 28 16:17 man

thaJeztah avatar Oct 28 '19 15:10 thaJeztah