-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.arm64v8
41 lines (35 loc) · 1.32 KB
/
Dockerfile.arm64v8
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
FROM alpine:latest AS builder
RUN apk --update --no-cache add curl tar && \
curl -L https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-aarch64.tar.gz | tar zxvf - -C . && mv qemu-3.0.0+resin-aarch64/qemu-aarch64-static .
FROM arm64v8/alpine:latest
# Copy across the qemu binary that was downloaded in the previous build step
COPY --from=builder /qemu-aarch64-static /usr/bin
# Include dist/
ADD dist/ /root/dist/
# Install packages
RUN apk add --no-cache --update-cache \
git \
libcap \
python3 \
python3-dev && \
# Install adbhoney from git
git clone --depth=1 https://github.com/huuck/ADBHoney /opt/adbhoney && \
cp /root/dist/adbhoney.cfg /opt/adbhoney && \
sed -i 's/dst_/dest_/' /opt/adbhoney/adbhoney/core.py && \
# Setup user, groups and configs
addgroup -g 2000 adbhoney && \
adduser -S -H -s /bin/ash -u 2000 -D -g 2000 adbhoney && \
chown -R adbhoney:adbhoney /opt/adbhoney && \
setcap cap_net_bind_service=+ep /usr/bin/python3.8 && \
# Clean up
apk del --purge \
git \
python3-dev && \
rm -rf /root/* && \
rm -rf /var/cache/apk/* && \
rm -rf /usr/bin/qemu-aarch64-static
# Set workdir and start adbhoney
STOPSIGNAL SIGKILL
USER adbhoney:adbhoney
WORKDIR /opt/adbhoney
CMD /usr/bin/python3 run.py