Skip to content

Commit

Permalink
build: generate armhf container locally with qemu-user
Browse files Browse the repository at this point in the history
  • Loading branch information
nachoparker committed Jun 26, 2018
1 parent f1cc627 commit 40f0cbc
Show file tree
Hide file tree
Showing 7 changed files with 16 additions and 110 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,5 +7,5 @@ torrent/
armbian/
raspbian_root
raspbian_boot
docker-armhf/raspbian_docker.img
ncp-web/wizard.cfg
qemu-arm-static
7 changes: 2 additions & 5 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ lamp-armhf: debian-ncp-armhf
docker build . -f docker-armhf/lamp/Dockerfile -t ownyourbits/lamp-armhf:latest

debian-ncp-armhf:
docker build . -f docker-armhf/debian-ncp/Dockerfile -t ownyourbits/debian-ncp-armhf:latest
docker build --pull . -f docker-armhf/debian-ncp/Dockerfile -t ownyourbits/debian-ncp-armhf:latest


nextcloudpi-x86: nextcloud-x86
Expand All @@ -28,10 +28,7 @@ lamp-x86: debian-ncp-x86
docker build . -f docker/lamp/Dockerfile -t ownyourbits/lamp-x86:latest

debian-ncp-x86:
docker build . -f docker/debian-ncp/Dockerfile -t ownyourbits/debian-ncp-x86:latest

devel:
docker build . -f docker/devel/Dockerfile -t ownyourbits/nextcloudpi-x86:devel
docker build --pull . -f docker/debian-ncp/Dockerfile -t ownyourbits/debian-ncp-x86:latest

# License
#
Expand Down
13 changes: 3 additions & 10 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -94,20 +94,13 @@ cd nextcloudpi
./build-SD-armbian.sh odroidxu4 # supported board code name
```

The docker armhf image can be generated in an ARM environment with docker
In order to generate the Docker images

```
git clone https://github.com/nextcloud/nextcloudpi.git
cd nextcloudpi
make
```

, and for an x86 image, on a x86 environment do

```
git clone https://github.com/nextcloud/nextcloudpi.git
cd nextcloudpi
make nextcloudpi-x86
make # armhf version
make nextcloudpi-x86 # x86 version
```

NextCloudPi can be installed in any architecture running the latest Debian
Expand Down
13 changes: 8 additions & 5 deletions batch.sh
Original file line number Diff line number Diff line change
Expand Up @@ -30,18 +30,21 @@ CLEAN=1 ./build-SD-rpi.sh "$IP"
./build-SD-armbian.sh bananapi Bananapi

# Docker x86
docker pull debian:stretch-slim
make nextcloudpi-x86 && {
docker push ownyourbits/nextcloudpi-x86
docker push ownyourbits/nextcloud-x86
docker push ownyourbits/lamp-x86
docker push ownyourbits/debian-ncp-x86
}

# docker armhf
[[ -f docker-armhf/raspbian_docker.img ]] || \
./installer.sh docker-armhf/docker-env.sh "$IP" raspbian_lite.img # && mv
./installer.sh docker-armhf/build-container.sh "$IP" docker-armhf/raspbian_docker.img
# Docker armhf
[[ -f qemu-arm-static ]] || cp /usr/bin/qemu-arm-static . || echo { "Need qemu-arm-static (and binfmt support) in the system to build the ARM container"; exit 1; }
make nextcloudpi-armhf && {
docker push ownyourbits/nextcloudpi-armhf
docker push ownyourbits/nextcloud-armhf
docker push ownyourbits/lamp-armhf
docker push ownyourbits/debian-ncp-armhf
}

# License
#
Expand Down
45 changes: 0 additions & 45 deletions docker-armhf/build-container.sh

This file was deleted.

2 changes: 2 additions & 0 deletions docker-armhf/debian-ncp/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ MAINTAINER Ignacio Núñez Hernanz <nacho@ownyourbits.com>

CMD /bin/bash

COPY qemu-arm-static /usr/bin

RUN mkdir -p /etc/services-available.d /etc/services-enabled.d

COPY docker-common/debian-ncp/run-parts.sh /
44 changes: 0 additions & 44 deletions docker-armhf/docker-env.sh

This file was deleted.

0 comments on commit 40f0cbc

Please sign in to comment.