소스 검색

Add Dockerfile that builds ffdo Gluon images.

Markus Lindenberg 9 년 전
부모
커밋
7e2329d578
2개의 변경된 파일46개의 추가작업 그리고 0개의 파일을 삭제
  1. 24 0
      Dockerfile
  2. 22 0
      docker/build.sh

+ 24 - 0
Dockerfile

@@ -0,0 +1,24 @@
+FROM debian:jessie
+MAINTAINER Markus Lindenberg <markus@lindenberg.io>
+
+ENV GLUON_TAG v2014.4
+
+ENV DEBIAN_FRONTEND noninteractive
+ENV DEBIAN_PRIORITY critical
+ENV DEBCONF_NOWARNINGS yes
+
+RUN apt-get update
+RUN apt-get -y install --no-install-recommends ca-certificates python wget file git subversion build-essential gawk unzip libncurses5-dev zlib1g-dev && apt-get clean
+
+
+ADD docker/build.sh /usr/src/build.sh
+ADD site.mk /usr/src/site.mk
+ADD site.conf /usr/src/site.conf
+
+RUN adduser --system --home /usr/src/build build
+USER build
+WORKDIR /usr/src/build
+RUN git config --global user.email "technik@freifunk-dortmund.de"
+RUN git config --global user.name "FFDO Gluon Build System"
+
+CMD ["/usr/src/build.sh"]

+ 22 - 0
docker/build.sh

@@ -0,0 +1,22 @@
+#!/bin/bash
+
+set -x -e
+
+# Clean up
+rm -rf gluon
+git clone https://github.com/freifunk-gluon/gluon.git gluon -b "${GLUON_TAG}"
+
+# Add site configuration
+mkdir -p gluon/site
+cp /usr/src/site.mk gluon/site/
+cp /usr/src/site.conf gluon/site/
+
+# Build
+cd gluon
+make update
+time make -j 5 GLUON_TARGET=ar71xx-generic
+
+set +x
+echo -e "\nBUILD FINISHED\n"
+echo "You can copy the resulting images from the conatiner using:"
+echo -e "\ndocker cp ${HOSTNAME}:/usr/src/build/gluon/images <destination>\n"