Skip to content
This repository has been archived by the owner on Oct 26, 2023. It is now read-only.

Commit

Permalink
Aarch64 /Arm64v8 support (#106)
Browse files Browse the repository at this point in the history
* Create Dockerfile.arm64v8

add Dockerfile for arm64v8

* add arm64v8 to multi-arch-manifest
  • Loading branch information
hobbypunk90 authored and zewelor committed Sep 26, 2019
1 parent fb52b64 commit cb5dcfb
Show file tree
Hide file tree
Showing 2 changed files with 48 additions and 0 deletions.
43 changes: 43 additions & 0 deletions Dockerfile.arm64v8
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
FROM alpine AS builder

ENV QEMU_URL https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-aarch64.tar.gz
RUN apk add curl && curl -L ${QEMU_URL} | tar zxvf - -C . --strip-components 1

FROM arm64v8/alpine:3.9

COPY --from=builder qemu-arm-static /usr/bin
RUN mkdir application
WORKDIR /application
ADD . /application

RUN apk add --no-cache tzdata python3 git bluez glib-dev make bluez-dev bluez-libs musl-dev linux-headers gcc grep && \
python3 -m ensurepip && \
rm -r /usr/lib/python*/ensurepip && \
pip3 install --upgrade pip setuptools && \
if [ ! -e /usr/bin/pip ]; then \
ln -s pip3 /usr/bin/pip ; \
fi && \
if [[ ! -e /usr/bin/python ]]; then \
ln -sf /usr/bin/python3 /usr/bin/python; \
fi && \
rm -r /root/.cache && \
mkdir /config && \
pip install -r requirements.txt && \
ln -s /config/config.yaml ./config.yaml && \
apk del --no-cache bluez-dev musl-dev gcc make git glib-dev linux-headers grep python2

RUN apk add --no-cache tzdata python3 git bluez glib-dev make bluez-dev bluez-libs musl-dev linux-headers gcc grep && \
grep -P "(?<=REQUIREMENTS).*" workers/*.py | grep -Po "(?<=\[).*(?=\])" | tr ',' '\n' | tr "'" " "| tr "\"" " " > /tmp/requirements.txt && \
cat /tmp/requirements.txt && \
pip install -r /tmp/requirements.txt && \
rm /tmp/requirements.txt && \
apk del --no-cache bluez-dev musl-dev gcc make git glib-dev linux-headers grep python2

ADD ./start.sh /start.sh
RUN chmod +x /start.sh

ENV DEBUG false

VOLUME ["/config"]

ENTRYPOINT ["/bin/sh", "-c", "/start.sh"]
5 changes: 5 additions & 0 deletions multi-arch-manifest.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,8 @@ manifests:
architecture: arm
os: linux
variant: v7
- image: zewelor/bt-mqtt-gateway:arm64v8
platform:
architecture: arm64
os: linux
variant: v8

0 comments on commit cb5dcfb

Please sign in to comment.