-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile.arm
31 lines (24 loc) · 1004 Bytes
/
Dockerfile.arm
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
ARG BALENA_DEBIAN_TAG=buster
ARG BALENA_DEBIAN_DIGEST=sha256:b32c2579e735f8257211c9b2c2eeab6db199907e138380833dbe2515cc6878e3
FROM balenalib/raspberrypi3-debian:${BALENA_DEBIAN_TAG}@${BALENA_DEBIAN_DIGEST} AS base
ENV PYTHONUNBUFFERED "1"
ENV PYTHONIOENCODING "UTF-8"
ENV K8S_VERSION=1.18.2 \
K8S_ARCH=arm \
YQ_VERSION=v4.2.1 \
YQ_BINARY=yq_linux_amd64 \
FLASK_APP=/api.py \
FLASK_RUN_HOST=0.0.0.0 \
FLASK_RUN_PORT=8080 \
WERKZEUG_RUN_MAIN=true \
MANIFEST_FILE_PATH=/manifest.json
COPY ./api.py ./manifest.json ./requirements.txt /
RUN apt-get update -y && \
apt-get install curl python3 python3-pip libcurl4-openssl-dev libssl-dev jq -y && \
pip3 install --upgrade pip && \
pip3 install -r /requirements.txt && \
curl -LO "https://storage.googleapis.com/kubernetes-release/release/v$K8S_VERSION/bin/linux/$K8S_ARCH/kubectl" && \
mv ./kubectl /usr/bin/kubectl && \
chmod +x /usr/bin/kubectl
EXPOSE 8080
CMD ["python3", "-m", "flask", "run"]