Skip to content

Commit

Permalink
docker hub hooks
Browse files Browse the repository at this point in the history
  • Loading branch information
rodrigondec committed Dec 6, 2019
1 parent fbefede commit 725522d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 2 deletions.
7 changes: 5 additions & 2 deletions Dockerfile.arm
Original file line number Diff line number Diff line change
@@ -1,9 +1,12 @@
FROM arm32v7/python:3.7
ENV PYTHONUNBUFFERED 1

COPY qemu-arm-static /usr/bin

# Requirements have to be pulled and installed here, otherwise caching won't work
COPY requirements.txt requirements.txt
COPY requirements-dev.txt requirements-dev.txt
RUN pip install -r requirements-dev.txt
RUN pip install -r requirements.txt

WORKDIR /bot

COPY . /bot/
3 changes: 3 additions & 0 deletions hooks/post_checkout
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
#!/bin/bash
# downloads a local copy of qemu on docker-hub build machines
curl -L https://github.com/balena-io/qemu/releases/download/v3.0.0%2Bresin/qemu-3.0.0+resin-arm.tar.gz | tar zxvf - -C . && mv qemu-3.0.0+resin-arm/qemu-arm-static .
4 changes: 4 additions & 0 deletions hooks/pre_build
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash
# Register qemu-*-static for all supported processors except the
# current one, but also remove all registered binfmt_misc before
docker run --rm --privileged multiarch/qemu-user-static:register --reset

0 comments on commit 725522d

Please sign in to comment.