This repository contains Dockerfiles and scripts to build base images for use within Stackable.
This image is meant to be used in multi-stage builds as a base image for projects building Rust projects.
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/ubi8-rust-builder AS builder
FROM registry.access.redhat.com/ubi8/ubi-minimal AS operator
LABEL maintainer="Stackable GmbH"
# Update image
RUN microdnf update --disablerepo=* --enablerepo=ubi-8-baseos-rpms --enablerepo=ubi-8-baseos-rpms -y \
&& rm -rf /var/cache/yum \
&& microdnf install --disablerepo=* --enablerepo=ubi-8-appstream-rpms --enablerepo=ubi-8-baseos-rpms shadow-utils -y \
&& 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"]
Product images are published to the docker.stackable.tech
registry under the stackable
organization.
Prerequisites:
-
Stackable Image Tools (
pip install image-tools-stackabletech
) https://github.com/stackabletech/image-tools -
Docker including the
buildx
plugin: https://github.com/docker/buildx
To build and push product images to the default repository, use the bake
-tool like this:
bake --product zookeeper --image 0.0.0-dev --push
This will build images for Apache ZooKeeper versions as defined in the conf.py
file and tag them with the image-version
0.0.0-dev
The GitHub action called Product images
can be triggered manually to do the same but not on the local machine.
Prerequisites:
-
Stackable Image Tools (
pip install image-tools-stackabletech
) https://github.com/stackabletech/image-tools -
OpenShift preflight tool: https://github.com/redhat-openshift-ecosystem/openshift-preflight
To verify if Apache Zookeeper validate against OpenShift preflight, run:
check-container --product zookeeper --image 0.0.0-dev