This repository contains Dockerfiles and scripts to build base images for use within Stackable.
- Stackable Image Tools (
pip install image-tools-stackabletech
) - Docker including the
buildx
plugin - Optional: OpenShift preflight tool to verify an image for OpenShift
Product images are published to the docker.stackable.tech
registry under the stackable
organization by default.
To build and push product images to the default repository use this command:
bake --product zookeeper --image 0.0.0-dev --push
This will build images for Apache ZooKeeper versions as defined in the conf.py
file, tag them with the image-version
0.0.0-dev and push them to the registry.
You can select a specific version of a product to build using the syntax product=version
e.g. to build Hive 3.1.3 you can use this command:
bake --product hive=3.1.3 -i 0.0.0-dev
Note
-i
is the shorthand for --image
(i.e. the resulting image tag)
To build all products in all versions locally you can use this command
bake --image-version 0.0.0-dev
The GitHub action called Build (and optionally publish) 0.0.0-dev images
can be triggered manually to do build all images in all versions.
When triggered manually it will not push the images to the registry.
To verify if Apache Zookeeper validate against OpenShift preflight, run:
check-container --product zookeeper --image 0.0.0-dev
These images are meant to be used in multi-stage builds as a base image for projects building Rust projects. They are automatically rebuilt and pushed every night and also on every push to the main branch, in addition a build can be triggered using GitHub Actions.
The image will run cargo build --release
in the current context and copy all binaries to an /app
directory.
This will bake in the current stable Rust version at the time this image was built, which means it should be rebuilt (and tagged) for every release of Rust.
FROM docker.stackable.tech/ubi9-rust-builder AS builder
FROM registry.access.redhat.com/ubi9/ubi-minimal AS operator
LABEL maintainer="Stackable GmbH"
# Update image
RUN microdnf update \
&& microdnf install \
shadow-utils \
&& rm -rf /var/cache/yum
COPY --from=builder /app/stackable-zookeeper-operator /
RUN groupadd -g 1000 stackable && adduser -u 1000 -g stackable -c 'Stackable Operator' stackable
USER 1000:1000
ENTRYPOINT ["/stackable-zookeeper-operator"]