From 9addc6fcae1eae814e35ee25d22f5801e7cda032 Mon Sep 17 00:00:00 2001 From: Daniel Eder <1525711+daniel-eder@users.noreply.github.com> Date: Thu, 1 Oct 2020 14:25:52 +0200 Subject: [PATCH] Improve Docker configuration - Add directories to .dockerignore - Replace initial scancode configuration command Signed-off-by: Daniel Eder <1525711+daniel-eder@users.noreply.github.com> --- .dockerignore | 7 ++++++- Dockerfile | 4 ++-- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.dockerignore b/.dockerignore index e5b123b6c6a..d50290ec951 100644 --- a/.dockerignore +++ b/.dockerignore @@ -6,4 +6,9 @@ Dockerfile .git/ .github/ .gitattributes -.gitignore \ No newline at end of file +.gitignore + +# Ignore other directories that are not required in the image +tests/ +docs/ +samples/ \ No newline at end of file diff --git a/Dockerfile b/Dockerfile index eb5c76b04ff..02e1681d3df 100644 --- a/Dockerfile +++ b/Dockerfile @@ -36,8 +36,8 @@ COPY . scancode-toolkit # Set workdir WORKDIR scancode-toolkit -# Run scancode once for configuration -RUN ./scancode --help +# Run scancode once for initial configuration, with --reindex-licenses to create the base license index +RUN ./scancode --reindex-licenses # Add scancode to path ENV PATH=$HOME/scancode-toolkit:$PATH