forked from open-horizon/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.arm64
21 lines (17 loc) · 992 Bytes
/
Dockerfile.arm64
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
FROM arm64v8/alpine:latest
#FROM aarch64/alpine:latest
RUN apk --no-cache --update add curl jq bc
# We build kafkacat outside of this Dockerfile using: https://github.com/sgerrand/alpine-pkg-kafkacat and the instructions in README.md
# Install kafkacat (the Makefile already copied these files from ../../../tools/kafkacat/$ARCH) to tmp/$ARCH
#todo: i do not know how to do these 2 COPYs and the RUN in the same layer, so removing the apk pkg is effective
# Note: https://docs.docker.com/engine/reference/builder/#copy says "you cannot COPY ../something /something, because the first step of a docker build is to send the context directory (and subdirectories) to the docker daemon."
COPY tmp/arm64/*.rsa.pub /etc/apk/keys/
COPY tmp/arm64/kafkacat-*.apk /
RUN apk --no-cache add /kafkacat-*.apk && rm kafkacat-*.apk
# Create hzngroup and hznuser
RUN addgroup -S hzngroup && adduser -S hznuser -G hzngroup
# Run container as hznuser user
USER hznuser
COPY *.sh /
WORKDIR /
CMD /service.sh