build: generate armhf container locally with qemu-user

This commit is contained in:
nachoparker 2018-06-26 07:45:17 +02:00
parent f1cc627f2f
commit 40f0cbc9b6
7 changed files with 16 additions and 110 deletions

2
.gitignore vendored
View File

@ -7,5 +7,5 @@ torrent/
armbian/
raspbian_root
raspbian_boot
docker-armhf/raspbian_docker.img
ncp-web/wizard.cfg
qemu-arm-static

View File

@ -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
@ -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
#

View File

@ -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

View File

@ -30,7 +30,6 @@ 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
@ -38,10 +37,14 @@ make nextcloudpi-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
#

View File

@ -1,45 +0,0 @@
#!/bin/bash
# Build NextCloudPi ARM docker container in a QEMU Raspbian with docker
#
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
# GPL licensed (see end of file) * Use at your own risk!
#
# Usage: ./installer.sh build-container.sh <DHCP QEMU image IP> <image>
#
install()
{
[[ -d nextcloudpi ]] || git clone --depth 1 https://github.com/nextcloud/nextcloudpi.git
cd nextcloudpi
git pull origin master
docker pull arm32v7/debian:stretch-slim
make && {
docker push ownyourbits/nextcloudpi-armhf
docker push ownyourbits/nextcloud-armhf
docker push ownyourbits/lamp-armhf
docker push ownyourbits/debian-ncp-armhf
}
}
configure(){ :; }
cleanup() { :; }
# License
#
# This script is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this script; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307 USA

View File

@ -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 /

View File

@ -1,44 +0,0 @@
#!/bin/bash
# Install docker ARM on Raspbian
#
# Copyleft 2017 by Ignacio Nunez Hernanz <nacho _a_t_ ownyourbits _d_o_t_ com>
# GPL licensed (see end of file) * Use at your own risk!
#
# Usage: ./installer.sh docker-env.sh <DHCP QEMU image IP> <image>
#
install()
{
curl -sSL get.docker.com | sh
usermod -aG docker pi
}
configure(){ :; }
cleanup()
{
apt-get autoremove
apt-get clean
rm /var/lib/apt/lists/* -r
systemctl disable ssh
}
# License
#
# This script is free software; you can redistribute it and/or modify it
# under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This script is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this script; if not, write to the
# Free Software Foundation, Inc., 59 Temple Place, Suite 330,
# Boston, MA 02111-1307 USA