|
22 | 22 |
|
23 | 23 | # Start from the ubuntu:xenial image |
24 | 24 | FROM ubuntu:xenial |
| 25 | +# We want our working directory to be the toplevel |
| 26 | +WORKDIR / |
25 | 27 | # Everything from our current directory (repo toplevel in travis-ci) |
26 | 28 | # should be copied into our container at the top-level sol2 directory |
27 | | -ADD . /sol2 |
| 29 | +ADD . sol2 |
| 30 | +ARG CI=true |
| 31 | +ARG LUA_VERSION=5.3.4 |
| 32 | +ARG GCC_VERSION |
| 33 | +ARG LLVM_VERSION |
28 | 34 | #VOLUME /sol2 |
29 | | -# We want our working directory to be the toplevel |
30 | | -WORKDIR / |
| 35 | +# Potential environment variables |
| 36 | +ENV LUA_VERSION=${LUA_VERSION} GCC_VERSION=${GCC_VERSION} LLVM_VERSION=${LLVM_VERSION} CI=${CI} |
31 | 37 | # RUN is how you write to the image you've pulled down |
32 | 38 | # RUN actions are "committed" to the image, and everything will |
33 | 39 | # start from the base after all run commands are executed |
34 | | -RUN apt update |
35 | | -RUN apt -y install sudo zsh |
36 | | -RUN apt -y dist-upgrade |
37 | | -RUN mkdir -p build-sol2/Debug build-sol2/Release |
38 | | -RUN chmod +x /sol2/scripts/preparation.linux.sh |
39 | | -RUN ["/usr/bin/env", "zsh", "-c", "-x", "./sol2/scripts/preparation.linux.sh"] |
| 40 | +RUN apt-get update |
| 41 | +RUN apt-get -y install sudo zsh |
| 42 | +RUN apt-get -y dist-upgrade |
| 43 | +RUN mkdir -p /build-sol2/Debug /build-sol2/Release |
| 44 | +RUN chmod +x /sol2/scripts/preparation.linux.sh /sol2/scripts/run.linux.sh |
| 45 | +RUN ["/usr/bin/env", "zsh", "-e", "/sol2/scripts/preparation.linux.sh"] |
40 | 46 | # CMD/ENTRYPOINT is different from RUN |
41 | 47 | # these are done on a per-instantiation and essentially describe |
42 | 48 | # the DEFAULT behavior of this container when its started, not what state it |
43 | 49 | # gets "saved" in... |
44 | 50 | # it only runs the last CMD/ENTRYPOINT as the default behavior: |
45 | 51 | # multiple CMDs will not be respected |
46 | | -CMD ["/usr/bin/env", "zsh", "-c", "-x", "chmod +x /sol2/scripts/run.linux.sh && ./sol2/scripts/run.linux.sh"] |
| 52 | +ENTRYPOINT ["/usr/bin/env", "zsh", "-x", "-e", "/sol2/scripts/run.linux.sh"] |
0 commit comments