Skip to content

Commit 0379c8f

Browse files
azunAnatolii Guzovatii
authored andcommitted
Added support for ARM images (#13)
1 parent 3800c82 commit 0379c8f

File tree

3 files changed

+19
-15
lines changed

3 files changed

+19
-15
lines changed

.github/workflows/build-push-docker.yml

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -11,27 +11,30 @@ jobs:
1111
steps:
1212
- name: Checkout
1313
uses: actions/checkout@v2
14-
14+
1515
- name: Docker meta
1616
id: meta
1717
uses: docker/metadata-action@v4
1818
with:
1919
images: adobe/cruise-control
20-
20+
21+
- name: Set up QEMU
22+
uses: docker/setup-qemu-action@v3
2123
- name: Set up Docker Buildx
22-
uses: docker/setup-buildx-action@v2
23-
24+
uses: docker/setup-buildx-action@v3
25+
2426
- name: Login to DockerHub
2527
if: github.event_name != 'pull_request'
26-
uses: docker/login-action@v2
28+
uses: docker/login-action@v3
2729
with:
2830
username: ${{ secrets.DOCKER_USERNAME }}
2931
password: ${{ secrets.DOCKER_PASSWORD }}
30-
32+
3133
- name: Build and push
32-
uses: docker/build-push-action@v3
34+
uses: docker/build-push-action@v5
3335
with:
3436
context: .
37+
platforms: linux/amd64,linux/arm64
3538
file: docker/Dockerfile
3639
push: ${{ startsWith(github.ref, 'refs/tags/') }}
3740
tags: ${{ steps.meta.outputs.tags }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,4 @@ fileStore/failedBrokers.txt
2323
cruise-control/src/main/resources/webroot/.openapi-generator-ignore
2424
cruise-control/src/main/resources/webroot/.openapi-generator/
2525
cruise-control/src/main/resources/webroot/README.md
26+
.vscode

docker/Dockerfile

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM gradle:jdk21
1+
FROM gradle:jdk21 AS build
22

33
USER root
44
RUN apt-get update && apt-get upgrade -y && apt-get install -y --no-install-recommends git ca-certificates
@@ -13,14 +13,14 @@ RUN mv -v /cruise-control/cruise-control/build/libs/cruise-control-*.jar \
1313
RUN mv -v /cruise-control/cruise-control/build/dependant-libs/cruise-control-metrics-reporter-*.jar \
1414
/cruise-control/cruise-control/build/dependant-libs/cruise-control-metrics-reporter.jar
1515

16-
FROM node:18-buster
16+
FROM node:10 AS ui
1717
RUN mkdir /src && cd /src && git clone https://github.com/amuraru/cruise-control-ui.git
1818
WORKDIR /src/cruise-control-ui
1919
RUN git fetch origin
2020
RUN git checkout master
2121
RUN git pull
2222
RUN git rev-parse HEAD
23-
RUN npm install
23+
RUN npm install --verbose --timeout=600000
2424
RUN npm run build
2525

2626
# backported from https://github.com/docker-library/openjdk/blob/master/18/jdk/slim-bullseye/Dockerfile
@@ -110,12 +110,12 @@ RUN set -eux; \
110110
java --version
111111

112112
RUN mkdir -p /opt/cruise-control /opt/cruise-control/cruise-control-ui
113-
COPY --from=0 /cruise-control/cruise-control/build/libs/cruise-control.jar /opt/cruise-control/cruise-control/build/libs/cruise-control.jar
114-
COPY --from=0 /cruise-control/config /opt/cruise-control/config
115-
COPY --from=0 /cruise-control/kafka-cruise-control-start.sh /opt/cruise-control/
116-
COPY --from=0 /cruise-control/cruise-control/build/dependant-libs /opt/cruise-control/cruise-control/build/dependant-libs
113+
COPY --from=build /cruise-control/cruise-control/build/libs/cruise-control.jar /opt/cruise-control/cruise-control/build/libs/cruise-control.jar
114+
COPY --from=build /cruise-control/config /opt/cruise-control/config
115+
COPY --from=build /cruise-control/kafka-cruise-control-start.sh /opt/cruise-control/
116+
COPY --from=build /cruise-control/cruise-control/build/dependant-libs /opt/cruise-control/cruise-control/build/dependant-libs
117117
COPY docker/opt/cruise-control /opt/cruise-control/
118-
COPY --from=1 /src/cruise-control-ui/dist /opt/cruise-control/cruise-control-ui/dist
118+
COPY --from=ui /src/cruise-control-ui/dist /opt/cruise-control/cruise-control-ui/dist
119119
RUN echo "local,localhost,/kafkacruisecontrol" > /opt/cruise-control/cruise-control-ui/dist/static/config.csv
120120

121121
EXPOSE 8090

0 commit comments

Comments
 (0)