Skip to content
This repository was archived by the owner on Mar 8, 2020. It is now read-only.

Commit 71ea781

Browse files
author
Juanjo Alvarez
committed
Use a local copy of pydetector if it exists
Signed-off-by: Juanjo Alvarez <juanjo@sourced.tech>
1 parent 4dd607b commit 71ea781

3 files changed

Lines changed: 12 additions & 3 deletions

File tree

Dockerfile.build.tpl

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ RUN mkdir -p /opt/driver/src && \
44
adduser $BUILD_USER -u $BUILD_UID -D -h /opt/driver/src
55

66
RUN apk add --no-cache --update python python-dev python3 python3-dev py-pip py2-pip git build-base bash
7-
RUN pip3 install pydetector-bblfsh==0.10.3 \
8-
git+https://github.com/python/mypy.git@0bb2d1680e8b9522108b38d203cb73021a617e64#egg=mypy-lang
7+
RUN pip3 install git+https://github.com/python/mypy.git@0bb2d1680e8b9522108b38d203cb73021a617e64#egg=mypy-lang
98

109
WORKDIR /opt/driver/src

Dockerfile.tpl

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,15 @@ MAINTAINER source{d}
33

44
RUN apk add --no-cache --update python python3 py-pip py2-pip git
55

6-
RUN pip2 install pydetector-bblfsh==0.10.3
76

87
ADD build /opt/driver/bin
98
ADD native/python_package /tmp/python_driver
109
RUN pip3 install /tmp/python_driver
1110
RUN yes|rm -rf /tmp/python_driver
1211

12+
ADD native/dev_deps /tmp/dev_deps
13+
RUN pip2 install -U /tmp/dev_deps/python-pydetector || pip2 install pydetector-bblfsh==0.10.3
14+
RUN pip3 install -U /tmp/dev_deps/python-pydetector || pip3 install pydetector-bblfsh==0.10.3
15+
RUN yes|rm -rf /tmp/dev_deps
16+
1317
CMD /opt/driver/bin/driver

native/dev_deps/README.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
If a pydetector directory exists here, it will be installed to the driver
2+
container image instead of the one from PyPI. This way you can test pydetector
3+
features related to the driver without publishing new versions.
4+
5+
Note that Docker doesn't allow to `ADD` symlinks so the directory
6+
must be copied, not linked.

0 commit comments

Comments
 (0)