зеркало из https://github.com/github/vitess-gh.git
k8s: Fix guestbook image Python path.
We now have multiple packages packed as eggs, so we can't combine the site-packages directories.
This commit is contained in:
Родитель
06124495b4
Коммит
7b418d7cab
|
@ -15,13 +15,15 @@ WORKDIR /app
|
|||
RUN virtualenv /env
|
||||
ADD requirements.txt /app/requirements.txt
|
||||
RUN /env/bin/pip install -r /app/requirements.txt
|
||||
ADD . /app
|
||||
ADD main.py requirements.txt /app/
|
||||
ADD static /app/static
|
||||
|
||||
EXPOSE 8080
|
||||
CMD []
|
||||
ENTRYPOINT ["/env/bin/python", "main.py"]
|
||||
|
||||
ADD tmp/pkg /app/site-packages
|
||||
ADD tmp/lib/* /app/lib/
|
||||
ADD tmp/pkg /app/pkg
|
||||
ADD tmp/lib /app/lib
|
||||
ENV LD_LIBRARY_PATH /app/lib
|
||||
ENV PYTHONPATH /app/site-packages
|
||||
ENV PYTHONPATH /app/pkg/py-vtdb:/app/pkg/py-vt-bson-0.3.2/lib/python2.7/site-packages:/app/pkg/py-mock-1.0.1/lib/python2.7/site-packages:/app/pkg/dist-packages
|
||||
|
||||
|
|
|
@ -3,12 +3,10 @@
|
|||
set -e
|
||||
|
||||
# Collect all the local Python libs we need.
|
||||
cp -R $VTTOP/py/* /out/pkg/
|
||||
mkdir /out/pkg/google
|
||||
cp -R /usr/local/lib/python2.7/dist-packages/* /out/pkg/
|
||||
for pypath in $(find $VTROOT/dist -name site-packages); do
|
||||
cp -R $pypath/* /out/pkg/
|
||||
done
|
||||
mkdir -p /out/pkg/py-vtdb
|
||||
cp -R $VTTOP/py/* /out/pkg/py-vtdb/
|
||||
cp -R /usr/local/lib/python2.7/dist-packages /out/pkg/
|
||||
cp -R /vt/dist/py-* /out/pkg/
|
||||
|
||||
# We also need the grpc libraries.
|
||||
cp /usr/local/lib/libgrpc.so.0 /usr/local/lib/libgpr.so.0 /out/lib/
|
||||
|
|
Загрузка…
Ссылка в новой задаче