Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions .github/workflows/build-push-docker.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
name: build-publish-docker-image

on:
push:
tags:
- '*'
on: [push, pull_request]

jobs:
build:
Expand All @@ -12,14 +9,31 @@ jobs:
- uses: actions/checkout@v2
- name: Get tag name
id: vars
run: echo ::set-output name=tag::${GITHUB_REF:10}
- uses: docker/build-push-action@v1
run: |
ref=${GITHUB_REF:10}
ref="${ref////-}"
echo $ref
echo ::set-output name=tag::$ref
- name: Build and push zookeeper-operator image
uses: docker/build-push-action@v1
with:
dockerfile: Dockerfile
build_args: VERSION=${{ steps.vars.outputs.tag }},GIT_SHA=${{ github.sha }}
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: adobe/zookeeper-operator
tag_with_ref: true
add_git_labels: true
always_pull: true
push: ${{ startsWith(github.ref, 'refs/tags/') }}
- name: Build and push zookeeper image
uses: docker/build-push-action@v1
with:
path: docker
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
repository: adobe/zookeeper
tags: 3.6.1-${{ steps.vars.outputs.tag }}
add_git_labels: true
always_pull: true
push: ${{ startsWith(github.ref, 'refs/tags/') }}
8 changes: 5 additions & 3 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,18 @@
# http://www.apache.org/licenses/LICENSE-2.0
#

FROM openjdk:11-jdk
FROM openjdk:14.0.2-slim
RUN mkdir /zu
COPY zu /zu
WORKDIR /zu
RUN ./gradlew --console=verbose --info shadowJar

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

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