forked from open-horizon/examples
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.arm
20 lines (16 loc) · 960 Bytes
/
Dockerfile.arm
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
FROM arm32v6/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/arm/*.rsa.pub /etc/apk/keys/
COPY tmp/arm/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