forked from diyhue/diyHue
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathaarch64.Dockerfile
28 lines (22 loc) · 1.06 KB
/
aarch64.Dockerfile
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
FROM python:3.6-slim
WORKDIR /opt/hue-emulator
# Set Build Architecture, can be passed in build command with "--build-arg BUILDARCH=aarch64"
# valid values are aarch64, arm, i686, x86_64
ARG BUILD_ARCH=aarch64
COPY requirements.txt BridgeEmulator .build/genCert.sh .build/openssl.conf ./
#Install requirments
RUN apt-get update && \
apt-get install --no-install-recommends -y unzip curl nmap psmisc iproute2 libcoap-1-0-bin && \
rm -rf /var/lib/apt/lists/* && \
pip3 install --no-cache-dir -r requirements.txt && \
mv ./entertainment-${BUILD_ARCH} ./entertainment-srv && \
ln -s $(which coap-client) /opt/hue-emulator/coap-client-linux && \
# Add Docker Build scripts
chmod +x ./genCert.sh && \
sed -i "s|docker = False|docker = True |g" ./HueEmulator3.py && \
# Remove unused binaries
find . -name 'entertainment-*' ! -name 'entertainment-srv' -delete && \
find . -name 'coap-client-*' ! -name 'coap-client-linux' -delete
# Expose ports
EXPOSE 80 443 1900/udp 2100/udp
CMD [ "python3", "-u", "/opt/hue-emulator/HueEmulator3.py", "--docker" ]