Skip to content

Commit

Permalink
Merge pull request #1 from panubo/upgrade-21-jre-alpine
Browse files Browse the repository at this point in the history
Upgrade base image to 21-jre-alpine
  • Loading branch information
chaopanubo committed Jan 29, 2024
2 parents 99d344b + 5862d73 commit ca3a1f4
Show file tree
Hide file tree
Showing 4 changed files with 38 additions and 6 deletions.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# This workflow is based on build-push.yml but contains repo specific changes.

# Panubo build and push to Quay.io and ECR Public
# Source: https://github.com/panubo/reference-github-actions/blob/main/docker-images/build-push.yml
#
# Description: Panubo build and push to Quay.io and ECR Public
# This GH Action is intended for public docker images that package upstream applications/services (ie not for projects of Panubo's).
# For repos that build multiple repos use the multi-build-push.yml workflow.
#
Expand All @@ -11,6 +11,8 @@
# Automated testing is triggered by `make _ci_test`, if no test is required the Makefile target should just run `true`.
# Before tests are run a Docker build is performed, the resulting image has a tag of "test"
# BATS is installed since it is commonly required by the tests.
#
# LICENSE: MIT License, Copyright (c) 2021-2023 Volt Grid Pty Ltd t/a Panubo

name: build and push on main and tags

Expand Down Expand Up @@ -112,6 +114,6 @@ jobs:
push: ${{ github.event_name != 'pull_request' }}
cache-from: type=gha
cache-to: type=gha,mode=max
platforms: linux/amd64 # ,linux/arm64 # ARM unsupported due to https://github.com/adoptium/containers/issues/158
platforms: linux/amd64,linux/arm64
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
7 changes: 5 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM docker.io/eclipse-temurin:11-jre-alpine
FROM docker.io/eclipse-temurin:21-jre-alpine

ENV \
CMAK_VERSION=3.0.0.6 \
Expand All @@ -24,4 +24,7 @@ WORKDIR /cmak
USER cmak

ENTRYPOINT ["tini"]
CMD ["/cmak/bin/cmak", "-Dpidfile.path=/dev/null", "-Dapplication.home=/cmak", ""]
# Arguments `--add-opens` and `--add-exports` added due to new versions of
# Java. See Github issue https://github.com/yahoo/CMAK/issues/844 for more
# details
CMD ["/cmak/bin/cmak", "-Dpidfile.path=/dev/null", "-Dapplication.home=/cmak", "-J--add-opens=java.base/sun.net.www.protocol.file=ALL-UNNAMED", "-J--add-exports=java.base/sun.net.www.protocol.file=ALL-UNNAMED"]
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Docker CMAK

Docker image of [yahoo/CMAK](https://github.com/yahoo/CMAK).

## Testing and Development

Some tests are provided in [tests/](tests/).

A `docker-compose.yaml` is provided with Zookeeper and Kafka. Once running a cluster can be added by setting the "Cluster Zookeeper Hosts" to `zk:2181`.
21 changes: 21 additions & 0 deletions docker-compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
version: '3.6'

services:
zk:
image: zookeeper:latest
environment:
ZOO_SERVERS: server.1=0.0.0.0:2888:3888;2181
kafka:
image: wurstmeister/kafka:2.12-2.1.1
environment:
KAFKA_ADVERTISED_HOST_NAME: kafka
KAFKA_ZOOKEEPER_CONNECT: "zk:2181"
KAFKA_CREATE_TOPICS: "test:1:1"
ports:
- "9092"
cmak:
build: .
ports:
- "9000"
environment:
ZK_HOSTS: "zk:2181"

0 comments on commit ca3a1f4

Please sign in to comment.