summaryrefslogtreecommitdiff
path: root/testing
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2019-03-01 01:35:38 (GMT)
committerGitHub <noreply@github.com>2019-03-01 01:35:38 (GMT)
commitc4126d9397353a74ca5aff602dd2c0c527e1dd07 (patch)
treead57c42120f56c2a6e16709553b5960684dd3228 /testing
parentf208f0f782586cd3e2e1c897cf631ad5a8f9ba93 (diff)
parent28e311d2b91d5df019eadcf580d653fc2033fa2e (diff)
Merge pull request #1156 from stilor/more-docker-stuff
More docker stuff
Diffstat (limited to 'testing')
-rw-r--r--testing/docker/centos6/Dockerfile2
-rwxr-xr-xtesting/docker/common-scripts/ctng-install20
2 files changed, 21 insertions, 1 deletions
diff --git a/testing/docker/centos6/Dockerfile b/testing/docker/centos6/Dockerfile
index 02a261f..c3a0da8 100644
--- a/testing/docker/centos6/Dockerfile
+++ b/testing/docker/centos6/Dockerfile
@@ -8,4 +8,6 @@ RUN yum install -y autoconf gperf bison flex texinfo help2man gcc-c++ libtool li
RUN wget -O /sbin/dumb-init https://github.com/Yelp/dumb-init/releases/download/v1.2.1/dumb-init_1.2.1_amd64
RUN chmod a+x /sbin/dumb-init
RUN echo 'export PATH=/opt/ctng/bin:$PATH' >> /etc/profile
+# The limits in this file prevent su'ing to ctng user
+RUN rm -f /etc/security/limits.d/90-nproc.conf
ENTRYPOINT [ "/sbin/dumb-init", "--" ]
diff --git a/testing/docker/common-scripts/ctng-install b/testing/docker/common-scripts/ctng-install
index 6994fd5..1efd264 100755
--- a/testing/docker/common-scripts/ctng-install
+++ b/testing/docker/common-scripts/ctng-install
@@ -1,7 +1,25 @@
#!/bin/bash
set -e
+# Mounted directory may already be configured - or may not
+# even had bootstrapped.
+tar cf - -C / \
+ --exclude=crosstool-ng/.build \
+ --exclude=crosstool-ng/.build.all \
+ --exclude=crosstool-ng/.git \
+ --exclude=crosstool-ng/testing/docker \
+ crosstool-ng | \
+ tar xf -
+cd crosstool-ng
+if [ -r Makefile ]; then
+ make distclean
+elif [ ! -r configure ]; then
+ ./bootstrap
+fi
+cd ..
cd work
-/crosstool-ng/configure --prefix=/opt/ctng
+~/crosstool-ng/configure --prefix=/opt/ctng
make
make install
+cd ..
+rm -rf crosstool-ng