From 659782730bffea2d21e2fa22550db3166017061e Mon Sep 17 00:00:00 2001 From: Christian Franke Date: Sat, 1 Dec 2018 16:54:58 +0100 Subject: [PATCH] tests/topotests: Change docker build context In order to support automated builds, the build context needs to be the repository root. So adapt our dockerfile and buildscript for this. Also, add files which should not be included into the build context in .dockerignore to limit the size of the build context to something sensible. Signed-off-by: Christian Franke --- .dockerignore | 6 ++++++ tests/topotests/Dockerfile | 2 +- tests/topotests/docker/build.sh | 3 ++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/.dockerignore b/.dockerignore index 6b8710a71..f2fc34583 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1 +1,7 @@ .git +**/*.a +**/*.o +**/*.la +**/*.lo +**/*.so +**/.libs diff --git a/tests/topotests/Dockerfile b/tests/topotests/Dockerfile index 72a876ed8..3613e23a6 100644 --- a/tests/topotests/Dockerfile +++ b/tests/topotests/Dockerfile @@ -70,7 +70,7 @@ RUN echo "" >> /etc/security/limits.conf; \ echo "root hard core unlimited" >> /etc/security/limits.conf # Copy run scripts to facilitate users wanting to run the tests -COPY docker/inner /opt/topotests +COPY tests/topotests/docker/inner /opt/topotests WORKDIR /root/topotests ENV PATH "$PATH:/opt/topotests" diff --git a/tests/topotests/docker/build.sh b/tests/topotests/docker/build.sh index 344fb2ffc..3bb6dbaad 100755 --- a/tests/topotests/docker/build.sh +++ b/tests/topotests/docker/build.sh @@ -22,9 +22,10 @@ # CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE # SOFTWARE. -cd "$(dirname "$0")"/.. +cd "$(dirname "$0")"/../../.. exec docker build --pull \ --compress \ -t frrouting/frr:topotests-latest \ + -f tests/topotests/Dockerfile \ . -- 2.39.2