Skip to content

Commit c10c018

Browse files
authored
[BUILD] - Updated base zk image to openjdk 14.0.2 (#4)
- use openjdk 14.0.2 as base image for zk - added github action step to build adobe/zookeeper docker image using the zk-operator startup scripts in this repo
1 parent 8059cb9 commit c10c018

File tree

2 files changed

+25
-9
lines changed

2 files changed

+25
-9
lines changed
Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,6 @@
11
name: build-publish-docker-image
22

3-
on:
4-
push:
5-
tags:
6-
- '*'
3+
on: [push, pull_request]
74

85
jobs:
96
build:
@@ -12,14 +9,31 @@ jobs:
129
- uses: actions/checkout@v2
1310
- name: Get tag name
1411
id: vars
15-
run: echo ::set-output name=tag::${GITHUB_REF:10}
16-
- uses: docker/build-push-action@v1
12+
run: |
13+
ref=${GITHUB_REF:10}
14+
ref="${ref////-}"
15+
echo $ref
16+
echo ::set-output name=tag::$ref
17+
- name: Build and push zookeeper-operator image
18+
uses: docker/build-push-action@v1
1719
with:
1820
dockerfile: Dockerfile
1921
build_args: VERSION=${{ steps.vars.outputs.tag }},GIT_SHA=${{ github.sha }}
2022
username: ${{ secrets.DOCKER_USERNAME }}
2123
password: ${{ secrets.DOCKER_PASSWORD }}
2224
repository: adobe/zookeeper-operator
2325
tag_with_ref: true
26+
add_git_labels: true
27+
always_pull: true
2428
push: ${{ startsWith(github.ref, 'refs/tags/') }}
29+
- name: Build and push zookeeper image
30+
uses: docker/build-push-action@v1
31+
with:
32+
path: docker
33+
username: ${{ secrets.DOCKER_USERNAME }}
34+
password: ${{ secrets.DOCKER_PASSWORD }}
35+
repository: adobe/zookeeper
36+
tags: 3.6.1-${{ steps.vars.outputs.tag }}
2537
add_git_labels: true
38+
always_pull: true
39+
push: ${{ startsWith(github.ref, 'refs/tags/') }}

docker/Dockerfile

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,18 @@
88
# http://www.apache.org/licenses/LICENSE-2.0
99
#
1010

11-
FROM openjdk:11-jdk
11+
FROM openjdk:14.0.2-slim
1212
RUN mkdir /zu
1313
COPY zu /zu
1414
WORKDIR /zu
1515
RUN ./gradlew --console=verbose --info shadowJar
1616

17-
FROM zookeeper:3.6.1
17+
# use forked base zookeeper 3.6.1 docker image
18+
# that runs on openjdk-14.0.2 instead of openjdk-11
19+
FROM amuraru/zookeeper:3.6.1
1820
COPY bin /usr/local/bin
1921
RUN chmod +x /usr/local/bin/*
2022
COPY --from=0 /zu/build/libs/zu.jar /root/
2123

2224
RUN apt-get -q update && \
23-
apt-get install -y dnsutils curl procps
25+
apt-get install --no-install-recommends -y curl dnsutils procps

0 commit comments

Comments
 (0)