|
| 1 | +# Stackable Docker Images |
| 2 | + |
| 3 | +This repository contains Dockerfiles and scripts to build base images for use within Stackable. |
| 4 | + |
| 5 | +<!-- start:badges: autogenerated by ./update_readme_badges.sh --> |
| 6 | +| | | | | |
| 7 | +| -: | -: | -: | -: | |
| 8 | +| [![Build Airflow]][dev_airflow.yaml] | [![Build Druid]][dev_druid.yaml] | [![Build Hadoop]][dev_hadoop.yaml] | [![Build HBase]][dev_hbase.yaml] | |
| 9 | +| [![Build Hello-World]][dev_hello-world.yaml] | [![Build Hive]][dev_hive.yaml] | [![Build Java Base]][dev_java-base.yaml] | [![Build Java Development]][dev_java-devel.yaml] | |
| 10 | +| [![Build Kafka Testing Tools]][dev_kafka-testing-tools.yaml] | [![Build Kafka]][dev_kafka.yaml] | [![Build kcat]][dev_kcat.yaml] | [![Build Krb5]][dev_krb5.yaml] | |
| 11 | +| [![Build NiFi]][dev_nifi.yaml] | [![Build Omid]][dev_omid.yaml] | [![Build OPA]][dev_opa.yaml] | [![Build Spark K8s]][dev_spark-k8s.yaml] | |
| 12 | +| [![Build Stackable Base]][dev_stackable-base.yaml] | [![Build Superset]][dev_superset.yaml] | [![Build Testing Tools]][dev_testing-tools.yaml] | [![Build Tools]][dev_tools.yaml] | |
| 13 | +| [![Build Trino CLI]][dev_trino-cli.yaml] | [![Build Trino]][dev_trino.yaml] | [![Build Vector]][dev_vector.yaml] | [![Build ZooKeeper]][dev_zookeeper.yaml] | |
| 14 | +<!-- end:badges --> |
| 15 | + |
| 16 | +## Prerequisites |
| 17 | + |
| 18 | +* [Stackable Image Tools](https://github.com/stackabletech/image-tools) (`pip install image-tools-stackabletech`) |
| 19 | +* Docker including the [`buildx` plugin](https://github.com/docker/buildx) |
| 20 | +* Optional: [OpenShift preflight tool](https://github.com/redhat-openshift-ecosystem/openshift-preflight) to verify an image for OpenShift |
| 21 | + |
| 22 | +## Build Product Images |
| 23 | + |
| 24 | +Product images are published to the `docker.stackable.tech` registry under the `stackable` organization by default. |
| 25 | + |
| 26 | +### Build single products locally |
| 27 | + |
| 28 | +To build and push product images to the default repository use this command: |
| 29 | + |
| 30 | +```sh |
| 31 | +bake --product zookeeper --image 0.0.0-dev --push |
| 32 | +``` |
| 33 | + |
| 34 | +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. |
| 35 | + |
| 36 | +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: |
| 37 | + |
| 38 | +```sh |
| 39 | +bake --product hive=3.1.3 -i 0.0.0-dev |
| 40 | +``` |
| 41 | + |
| 42 | +> [!NOTE] |
| 43 | +> `-i` is the shorthand for `--image` (i.e. the resulting image tag) |
| 44 | +
|
| 45 | +### Build all products locally |
| 46 | + |
| 47 | +To build all products in all versions locally you can use this command |
| 48 | + |
| 49 | +```sh |
| 50 | +bake --image-version 0.0.0-dev |
| 51 | +``` |
| 52 | + |
| 53 | +### Build everything in GitHub |
| 54 | + |
| 55 | +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. |
| 56 | +When triggered manually it will _not_ push the images to the registry. |
| 57 | + |
| 58 | +## Verify Product Images |
| 59 | + |
| 60 | +To verify if Apache Zookeeper validate against OpenShift preflight, run: |
| 61 | + |
| 62 | +```sh |
| 63 | +check-container --product zookeeper --image 0.0.0-dev |
| 64 | +``` |
| 65 | + |
| 66 | +## ubi8-rust-builder / ubi9-rust-builder |
| 67 | + |
| 68 | +These images are meant to be used in multi-stage builds as a base image for projects building Rust projects. |
| 69 | +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. |
| 70 | + |
| 71 | +The image will run `cargo build --release` in the current context and copy all binaries to an `/app` directory. |
| 72 | + |
| 73 | +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. |
| 74 | + |
| 75 | +## Example usage |
| 76 | + |
| 77 | +```dockerfile |
| 78 | +FROM docker.stackable.tech/ubi9-rust-builder AS builder |
| 79 | + |
| 80 | +FROM registry.access.redhat.com/ubi9/ubi-minimal AS operator |
| 81 | +LABEL maintainer="Stackable GmbH" |
| 82 | + |
| 83 | +# Update image |
| 84 | +RUN microdnf update \ |
| 85 | + && microdnf install \ |
| 86 | + shadow-utils \ |
| 87 | + && rm -rf /var/cache/yum |
| 88 | + |
| 89 | +COPY --from=builder /app/stackable-zookeeper-operator / |
| 90 | + |
| 91 | +RUN groupadd -g 1000 stackable && adduser -u 1000 -g stackable -c 'Stackable Operator' stackable |
| 92 | + |
| 93 | +USER 1000:1000 |
| 94 | + |
| 95 | +ENTRYPOINT ["/stackable-zookeeper-operator"] |
| 96 | +``` |
| 97 | + |
| 98 | +<!-- start:links: autogenerated by ./update_readme_badges.sh --> |
| 99 | +[Build Airflow]: https://github.com/stackabletech/docker-images/actions/workflows/dev_airflow.yaml/badge.svg |
| 100 | +[dev_airflow.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_airflow.yaml |
| 101 | +[Build Druid]: https://github.com/stackabletech/docker-images/actions/workflows/dev_druid.yaml/badge.svg |
| 102 | +[dev_druid.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_druid.yaml |
| 103 | +[Build Hadoop]: https://github.com/stackabletech/docker-images/actions/workflows/dev_hadoop.yaml/badge.svg |
| 104 | +[dev_hadoop.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_hadoop.yaml |
| 105 | +[Build HBase]: https://github.com/stackabletech/docker-images/actions/workflows/dev_hbase.yaml/badge.svg |
| 106 | +[dev_hbase.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_hbase.yaml |
| 107 | +[Build Hello-World]: https://github.com/stackabletech/docker-images/actions/workflows/dev_hello-world.yaml/badge.svg |
| 108 | +[dev_hello-world.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_hello-world.yaml |
| 109 | +[Build Hive]: https://github.com/stackabletech/docker-images/actions/workflows/dev_hive.yaml/badge.svg |
| 110 | +[dev_hive.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_hive.yaml |
| 111 | +[Build Java Base]: https://github.com/stackabletech/docker-images/actions/workflows/dev_java-base.yaml/badge.svg |
| 112 | +[dev_java-base.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_java-base.yaml |
| 113 | +[Build Java Development]: https://github.com/stackabletech/docker-images/actions/workflows/dev_java-devel.yaml/badge.svg |
| 114 | +[dev_java-devel.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_java-devel.yaml |
| 115 | +[Build Kafka Testing Tools]: https://github.com/stackabletech/docker-images/actions/workflows/dev_kafka-testing-tools.yaml/badge.svg |
| 116 | +[dev_kafka-testing-tools.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_kafka-testing-tools.yaml |
| 117 | +[Build Kafka]: https://github.com/stackabletech/docker-images/actions/workflows/dev_kafka.yaml/badge.svg |
| 118 | +[dev_kafka.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_kafka.yaml |
| 119 | +[Build kcat]: https://github.com/stackabletech/docker-images/actions/workflows/dev_kcat.yaml/badge.svg |
| 120 | +[dev_kcat.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_kcat.yaml |
| 121 | +[Build Krb5]: https://github.com/stackabletech/docker-images/actions/workflows/dev_krb5.yaml/badge.svg |
| 122 | +[dev_krb5.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_krb5.yaml |
| 123 | +[Build NiFi]: https://github.com/stackabletech/docker-images/actions/workflows/dev_nifi.yaml/badge.svg |
| 124 | +[dev_nifi.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_nifi.yaml |
| 125 | +[Build Omid]: https://github.com/stackabletech/docker-images/actions/workflows/dev_omid.yaml/badge.svg |
| 126 | +[dev_omid.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_omid.yaml |
| 127 | +[Build OPA]: https://github.com/stackabletech/docker-images/actions/workflows/dev_opa.yaml/badge.svg |
| 128 | +[dev_opa.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_opa.yaml |
| 129 | +[Build Spark K8s]: https://github.com/stackabletech/docker-images/actions/workflows/dev_spark-k8s.yaml/badge.svg |
| 130 | +[dev_spark-k8s.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_spark-k8s.yaml |
| 131 | +[Build Stackable Base]: https://github.com/stackabletech/docker-images/actions/workflows/dev_stackable-base.yaml/badge.svg |
| 132 | +[dev_stackable-base.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_stackable-base.yaml |
| 133 | +[Build Superset]: https://github.com/stackabletech/docker-images/actions/workflows/dev_superset.yaml/badge.svg |
| 134 | +[dev_superset.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_superset.yaml |
| 135 | +[Build Testing Tools]: https://github.com/stackabletech/docker-images/actions/workflows/dev_testing-tools.yaml/badge.svg |
| 136 | +[dev_testing-tools.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_testing-tools.yaml |
| 137 | +[Build Tools]: https://github.com/stackabletech/docker-images/actions/workflows/dev_tools.yaml/badge.svg |
| 138 | +[dev_tools.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_tools.yaml |
| 139 | +[Build Trino CLI]: https://github.com/stackabletech/docker-images/actions/workflows/dev_trino-cli.yaml/badge.svg |
| 140 | +[dev_trino-cli.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_trino-cli.yaml |
| 141 | +[Build Trino]: https://github.com/stackabletech/docker-images/actions/workflows/dev_trino.yaml/badge.svg |
| 142 | +[dev_trino.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_trino.yaml |
| 143 | +[Build Vector]: https://github.com/stackabletech/docker-images/actions/workflows/dev_vector.yaml/badge.svg |
| 144 | +[dev_vector.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_vector.yaml |
| 145 | +[Build ZooKeeper]: https://github.com/stackabletech/docker-images/actions/workflows/dev_zookeeper.yaml/badge.svg |
| 146 | +[dev_zookeeper.yaml]: https://github.com/stackabletech/docker-images/actions/workflows/dev_zookeeper.yaml |
| 147 | +<!-- end:links --> |
0 commit comments