Fix PYTHONPATH environment var in Dockerfiles

My previous evolution of the Dockerfiles grouped the `ENV` entries into
a single definition to reduce the number of intermediate Docker image
layers. Unfortunately I didn't account for the duplicate `PYTHONPATH`
definition so only the second was being applied correctly. This commit
fixes that.

* Combine multiple `ENV PYTHONPATH=` to a single definition.

Signed-off-by: Daniel Llewellyn <daniel@snapcraft.ninja>
pull/1188/head
Daniel Llewellyn 2020-11-05 21:22:08 +00:00
rodzic d9c498e5ec
commit 474000503c
2 zmienionych plików z 4 dodań i 8 usunięć

Wyświetl plik

@ -2,8 +2,7 @@ FROM ubuntu:18.04 AS builder
# Env variables
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.6/dist-packages" \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm" \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.6/dist-packages:/code/SuperBuild/src/opensfm" \
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"
# Prepare directories
@ -44,8 +43,7 @@ FROM ubuntu:18.04
# Env variables
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.6/dist-packages" \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm" \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.6/dist-packages:/code/SuperBuild/src/opensfm" \
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"
WORKDIR /code

Wyświetl plik

@ -2,8 +2,7 @@ FROM ubuntu:18.04 AS builder
# Env variables
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.6/dist-packages" \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm" \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.6/dist-packages:/code/SuperBuild/src/opensfm" \
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"
# Prepare directories
@ -44,8 +43,7 @@ FROM ubuntu:18.04
# Env variables
ENV DEBIAN_FRONTEND=noninteractive \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.6/dist-packages" \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/src/opensfm" \
PYTHONPATH="$PYTHONPATH:/code/SuperBuild/install/lib/python3.6/dist-packages:/code/SuperBuild/src/opensfm" \
LD_LIBRARY_PATH="$LD_LIBRARY_PATH:/code/SuperBuild/install/lib"
WORKDIR /code