Skip to content

Commit daa92a5

Browse files
committed
[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 92b0221 commit daa92a5

File tree

2 files changed

+14
-8
lines changed

2 files changed

+14
-8
lines changed
Lines changed: 12 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,15 +9,22 @@ 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/') }}
2529
- name: Build and push zookeeper image
2630
uses: docker/build-push-action@v1
@@ -31,3 +35,5 @@ jobs:
3135
repository: adobe/zookeeper
3236
tags: 3.6.2-${{ steps.vars.outputs.tag }}
3337
add_git_labels: true
38+
always_pull: true
39+
push: ${{ startsWith(github.ref, 'refs/tags/') }}

docker/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
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
@@ -22,4 +22,4 @@ RUN chmod +x /usr/local/bin/*
2222
COPY --from=0 /zu/build/libs/zu.jar /root/
2323

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

0 commit comments

Comments
 (0)