diff --git a/Dockerfile.ubuntu b/Dockerfile similarity index 100% rename from Dockerfile.ubuntu rename to Dockerfile diff --git a/Dockerfile.raspbian b/Dockerfile.armhf similarity index 94% rename from Dockerfile.raspbian rename to Dockerfile.armhf index d5cec48..9c5e4f5 100644 --- a/Dockerfile.raspbian +++ b/Dockerfile.armhf @@ -1,8 +1,6 @@ -FROM resin/rpi-raspbian:jessie +FROM raspbian/jessie MAINTAINER ViViDboarder -RUN [ "cross-build-start" ] - RUN apt-get update \ && apt-get install -y --no-install-recommends \ cron \ @@ -26,8 +24,6 @@ RUN apt-get update \ python-swiftclient \ && rm -rf /var/apt/lists/* -RUN [ "cross-build-end" ] - VOLUME /root/.cache/duplicity VOLUME /backups VOLUME /var/lock/duplicity diff --git a/Makefile b/Makefile index 1816e8c..6f07fdd 100644 --- a/Makefile +++ b/Makefile @@ -8,11 +8,11 @@ test: test-x86 .PHONY: build-x86 build-x86: - docker build -f ./Dockerfile.ubuntu -t $(DOCKER_TAG):ubuntu . + docker build -f ./Dockerfile -t $(DOCKER_TAG):ubuntu . .PHONY: build-arm build-arm: - docker build -f ./Dockerfile.raspbian -t $(DOCKER_TAG):raspbian . + docker build -f ./Dockerfile.armhf -t $(DOCKER_TAG):raspbian . .PHONY: build-all build-all: build-x86 build-arm diff --git a/hooks/pre_build b/hooks/pre_build new file mode 100755 index 0000000..5444851 --- /dev/null +++ b/hooks/pre_build @@ -0,0 +1,8 @@ +#!/bin/bash + +BUILD_ARCH=$(echo "${DOCKERFILE_PATH}" | cut -d '.' -f 2) + +[ "${BUILD_ARCH}" == "Dockerfile" ] && \ + { echo 'qemu-user-static: Registration not required for current arch'; exit 0; } + +docker run --rm --privileged multiarch/qemu-user-static:register --reset