From 9d48e2cef70ccd9f508ca9f9af5d78aecb015af0 Mon Sep 17 00:00:00 2001 From: Jimmy Christensen Date: Fri, 15 Nov 2024 17:55:46 +0100 Subject: [PATCH] [docker] Fix building docker images without 2to3 (#1584) **Link the Issue(s) this Pull Request is related to.** Fixes #1582 **Summarize your change.** This copies in the `ci/fix_compiled_proto.py` script into the images which is needed to build them --- .dockerignore | 1 + cueadmin/Dockerfile | 1 + pycue/Dockerfile | 3 ++- pyoutline/Dockerfile | 3 ++- rqd/Dockerfile | 3 ++- 5 files changed, 8 insertions(+), 3 deletions(-) diff --git a/.dockerignore b/.dockerignore index ff43d450d..579d86f4c 100644 --- a/.dockerignore +++ b/.dockerignore @@ -1,4 +1,5 @@ ci +!ci/fix_compiled_proto.py cuebot/src/compiled_protobuf images samples diff --git a/cueadmin/Dockerfile b/cueadmin/Dockerfile index dd1359edc..910b9fd5b 100644 --- a/cueadmin/Dockerfile +++ b/cueadmin/Dockerfile @@ -24,6 +24,7 @@ RUN python3 -m grpc_tools.protoc \ # Fix imports to work in both Python 2 and 3. See # for more info. +COPY ci/fix_compiled_proto.py ./ci/ RUN python3 ci/fix_compiled_proto.py pycue/opencue/compiled_proto COPY cueadmin/README.md ./cueadmin/ diff --git a/pycue/Dockerfile b/pycue/Dockerfile index c61d3cf16..ca6ab9c66 100644 --- a/pycue/Dockerfile +++ b/pycue/Dockerfile @@ -25,7 +25,8 @@ RUN python3 -m grpc_tools.protoc \ # Fix imports to work in both Python 2 and 3. See # for more info. -RUN python ci/fix_compiled_proto.py pycue/opencue/compiled_proto +COPY ci/fix_compiled_proto.py ./ci/ +RUN python3 ci/fix_compiled_proto.py pycue/opencue/compiled_proto COPY VERSION.in VERSIO[N] ./ RUN test -e VERSION || echo "$(cat VERSION.in)" | tee VERSION diff --git a/pyoutline/Dockerfile b/pyoutline/Dockerfile index 6937a5584..8d7cc3015 100644 --- a/pyoutline/Dockerfile +++ b/pyoutline/Dockerfile @@ -24,7 +24,8 @@ RUN python3 -m grpc_tools.protoc \ # Fix imports to work in both Python 2 and 3. See # for more info. -RUN python ci/fix_compiled_proto.py pycue/opencue/compiled_proto +COPY ci/fix_compiled_proto.py ./ci/ +RUN python3 ci/fix_compiled_proto.py pycue/opencue/compiled_proto COPY pyoutline/README.md ./pyoutline/ COPY pyoutline/setup.py ./pyoutline/ diff --git a/rqd/Dockerfile b/rqd/Dockerfile index 6847ad10a..939a899d9 100644 --- a/rqd/Dockerfile +++ b/rqd/Dockerfile @@ -35,7 +35,8 @@ RUN python3.9 -m grpc_tools.protoc \ # Fix imports to work in both Python 2 and 3. See # for more info. -RUN python ci/fix_compiled_proto.py rqd/rqd/compiled_proto +COPY ci/fix_compiled_proto.py ./ci/ +RUN python3.9 ci/fix_compiled_proto.py rqd/rqd/compiled_proto COPY VERSION.in VERSIO[N] ./ RUN test -e VERSION || echo "$(cat VERSION.in)" | tee VERSION