Skip to content

Commit 7968832

Browse files
author
Sarah Mount
committed
FIXED issue with ENV var expansion and path names
1 parent 84e580f commit 7968832

File tree

1 file changed

+13
-11
lines changed

1 file changed

+13
-11
lines changed

Dockerfile

Lines changed: 13 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,20 +22,22 @@ RUN sudo apt-get update -qq && sudo apt-get -qq install -y build-essential \
2222
gcc-arm-linux-gnueabihf \
2323
g++-arm-linux-gnueabihf
2424

25-
WORKDIR $HOME
26-
RUN mkdir buildroot && sudo mkdir -p /opt/adapteva
25+
# Note that WORKDIR will not expand environment variables in docker versions < 1.3.1.
26+
# See docker issue 2637: https://github.com/docker/docker/issues/2637
27+
WORKDIR /root
28+
RUN mkdir -p /opt/buildroot && mkdir -p /opt/examples
29+
ENV EPIPHANY_BUILD_HOME /opt/buildroot
2730

28-
WORKDIR $HOME/buildroot
31+
WORKDIR /opt/buildroot
2932
RUN git clone https://github.com/adapteva/epiphany-sdk sdk --branch 2014.11
33+
RUN ./sdk/build-epiphany-sdk.sh -t 2014.11 -C -a x86_64 && echo SDK BUILD OK || cat logs/2014.11/build*.log
3034

31-
WORKDIR $HOME/buildroot/sdk
32-
RUN ./build-epiphany-sdk.sh -C -a x86_64 && echo OK || cat ../logs/2014.11/build*.log
33-
ENV EPIPHANY_HOME $HOME/buildroot/esdk.RevUndefined/
34-
ENV PATH $HOME/buildroot/esdk.RevUndefined/tools/e-gnu/bin:PATH
35-
ENV MANPATH $HOME/buildroot/esdk.RevUndefined/tools/e-gnu/share/man:$MANPATH
35+
ENV EPIPHANY_HOME /opt/buildroot/esdk.RevUndefined/
36+
ENV PATH /opt/buildroot/esdk.RevUndefined/tools/e-gnu/bin:$PATH
37+
ENV MANPATH /opt/buildroot/esdk.RevUndefined/tools/e-gnu/share/man:$MANPATH
3638

37-
WORKDIR $HOME/buildroot
39+
# Clone and build the official Parallella examples as a proof of concept.
40+
WORKDIR /opt
3841
RUN git clone https://github.com/adapteva/epiphany-examples.git examples
39-
40-
WORKDIR $HOME/buildroot/examples/scripts
42+
WORKDIR /opt/examples/scripts
4143
RUN ./build_all.sh

0 commit comments

Comments
 (0)