on master help sign in
Improve Docker build time

It is silly to add the source code before installing the dependencies, since then developers have to wait for the dependencies to be re-installed every time they modify the source code. Rearranging the Dockerfile leads to a tighter development cycle.

commit552557566ef9d31ce1a1f6464991565633062c6b authorRadon Rosborough <radon.neon@gmail.com> dateMon 3 Jun 2019, 14:57 (7 years ago) parentc5e45af
1 file changed+8−9
Dockerfile+8−9
Dockerfile+8−9
@@ -30,15 +30,6 @@ RUN wget https://julialang-s3.julialang.org/bin/linux/x64/1.1/julia-1.1.0-linux-
3030 cp -r share/* /usr/share/ && \
3131 cd .. && \
3232 rm -rf julia-1.1.0-linux-x86_64.tar.gz julia-1.1.0
33−
34−
35−RUN mkdir -p /gocode/src/github.com/replit/prybar
36−
37−ENV GOPATH=/gocode
38−ADD . /gocode/src/github.com/replit/prybar
39−WORKDIR /gocode/src/github.com/replit/prybar
40−
41−RUN cp languages/tcl/tcl.pc /usr/lib/pkgconfig/
4233
4334# OCaml / Reason stuff
4435RUN add-apt-repository ppa:avsm/ppa && \
@@ -48,6 +39,14 @@ RUN add-apt-repository ppa:avsm/ppa && \
4839 eval `opam env` && \
4940 echo "eval \`opam env\`" >> ~/.bashrc
5041
42+RUN mkdir -p /gocode/src/github.com/replit/prybar
43+
44+ENV GOPATH=/gocode
45+ADD . /gocode/src/github.com/replit/prybar
46+WORKDIR /gocode/src/github.com/replit/prybar
47+
48+RUN cp languages/tcl/tcl.pc /usr/lib/pkgconfig/
49+
5150RUN make \
5251 prybar-python2 \
5352 prybar-python3 \