From 09b84811aeb6eadbe7f25dfe2a753b5682b6baf0 Mon Sep 17 00:00:00 2001 From: Tim Head Date: Tue, 9 Jul 2019 17:59:14 +0200 Subject: [PATCH] Make sure all loops over dict items are deterministic --- repo2docker/buildpacks/base.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/repo2docker/buildpacks/base.py b/repo2docker/buildpacks/base.py index d78be4f3..0bb9703b 100644 --- a/repo2docker/buildpacks/base.py +++ b/repo2docker/buildpacks/base.py @@ -90,7 +90,7 @@ ENV PATH {{ ':'.join(path) }}:${PATH} {% if build_script_files -%} # If scripts required during build are present, copy them -{% for src, dst in build_script_files.items() %} +{% for src, dst in build_script_files|dictsort %} COPY {{ src }} {{ dst }} {% endfor -%} {% endif -%} @@ -127,7 +127,7 @@ ENV {{item[0]}} {{item[1]}} # example installing APT packages. {% if preassemble_script_files -%} # If scripts required during build are present, copy them -{% for src, dst in preassemble_script_files.items() %} +{% for src, dst in preassemble_script_files|dictsort %} COPY src/{{ src }} ${REPO_DIR}/{{ dst }} {% endfor -%} {% endif -%} @@ -151,7 +151,7 @@ RUN chown -R ${NB_USER}:${NB_USER} ${REPO_DIR} # Container image Labels! # Put these at the end, since we don't want to rebuild everything # when these change! Did I mention I hate Dockerfile cache semantics? -{% for k, v in labels.items() %} +{% for k, v in labels|dictsort %} LABEL {{k}}="{{v}}" {%- endfor %}