Skip to content

Latest commit

 

History

History
112 lines (84 loc) · 3.34 KB

README.md

File metadata and controls

112 lines (84 loc) · 3.34 KB

Docker images for building and running ProxySQL

Images can be found at:

build-images

  • used for building of proxysql packages
  • based on upstream images
  • added GCC build tooling
  • added build dependencies

build-clang-images

  • used for building of proxysql packages
  • based on upstream images
  • added CLANG build tooling
    • clang must use lld
    • RH based distros still pull GCC as dependency
  • added build dependencies

pkgtest-images

  • used for basic testing of built proxysql packages
  • based on upstream images
  • added runtime dependencies

proxysql-images

  • proxysql prebuild image

How to build images

Note

  • default build is MULTIARCH
  • built images are cached, and need LOAD or PUSH to be available
  • PUSH needs docker credentials authentication to hub.docker.com

Native-arch

run make inside of one of the folders to build native image, and load it into local image store e.g.:

cd build-images
make clean
NOMULTIARCH=1 LOAD=1 make [target]

Multi-arch

run make inside of one of the folders to build multi-arch images, and push to hub.docker.com image registry, supported architectures are amd64 and arm64. e.g.:

cd build-images
make clean
PUSH=1 make [target]

Setup Docker for local multiarch via Qemu

Note

  • Using buildx with Docker requires Docker engine 19.03 or newer
  • since Docker v23, BuildX is packaged and will be installed if you install from upstream

Install docker from upstream

Qemu is required for multiarch local builds

apt-get install --no-install-recommends qemu-system-arm

Bootstrap BuildX for local multiarch using qemu

docker rm -f buildx_buildkit_multiarch0
docker run --rm --privileged multiarch/qemu-user-static --reset -p yes
docker buildx rm multiarch
docker buildx create --name multiarch --driver docker-container --use
docker buildx inspect --bootstrap
docker buildx ls

Setup Docker for distributed native multiarch

Note

  • This requires native hosts for buidling respective arch
  • docker and buildx must be installed on all nodes
  • make sure to test the ssh connection first
docker buildx rm distarch
docker buildx create --name distarch --node local_amd64
docker buildx create --name distarch --append --node remote_arm64 ssh://root@<IP>
docker buildx use distarch
docker buildx inspect --bootstrap
docker buildx ls

Inner workings

Runing image build

docker buildx build -t proxysql/packaging:build-debian11 --platform linux/arm64,linux/amd64 proxysql-build-debian11

Uploading finished build

docker credentials
docker buildx build -t proxysql/packaging:build-debian11 --platform linux/arm64,linux/amd64 proxysql-build-debian11 --push

Resources...