diff options
author | Martin Nowack <m.nowack@imperial.ac.uk> | 2019-12-16 17:03:29 +0000 |
---|---|---|
committer | Cristian Cadar <c.cadar@imperial.ac.uk> | 2019-12-19 09:40:45 +0000 |
commit | 4ea6ee4d6a2c2fe8170dae086cf4c80590ccc5c4 (patch) | |
tree | 4b582203c43eb0380fa2e9471f8875842cbcf252 | |
parent | d67b910456e8d0d8756607a2ba43259d3aa3afd5 (diff) | |
download | klee-4ea6ee4d6a2c2fe8170dae086cf4c80590ccc5c4.tar.gz |
Reorganise Dockerfile to have KLEE user own the build directory
-rw-r--r-- | .dockerignore | 1 | ||||
-rw-r--r-- | Dockerfile | 14 |
2 files changed, 9 insertions, 6 deletions
diff --git a/.dockerignore b/.dockerignore index 11d13733..b90cbfa2 100644 --- a/.dockerignore +++ b/.dockerignore @@ -2,3 +2,4 @@ autom4te.cache **/.*.swp Dockerfile +cmake-*/ diff --git a/Dockerfile b/Dockerfile index 4a307e01..6ed74887 100644 --- a/Dockerfile +++ b/Dockerfile @@ -32,10 +32,9 @@ ENV MINISAT_VERSION=master ENV Z3_VERSION=4.8.4 ENV USE_LIBCXX=1 ENV KLEE_RUNTIME_BUILD="Debug+Asserts" - -COPY . /tmp/klee_src/ -RUN /tmp/klee_src//scripts/build/build.sh --debug --install-system-deps klee LABEL maintainer="KLEE Developers" + + # TODO remove adding sudo package # Create ``klee`` user for container with password ``klee``. # and give it password-less sudo access (temporarily so we can use the TravisCI scripts) @@ -46,11 +45,14 @@ RUN apt update && apt -y --no-install-recommends install sudo emacs vim file && cp /etc/sudoers /etc/sudoers.bak && \ echo 'klee ALL=(root) NOPASSWD: ALL' >> /etc/sudoers +# Copy across source files needed for build +COPY --chown=klee:klee . /tmp/klee_src/ + +# Build and set klee user to be owner +RUN /tmp/klee_src/scripts/build/build.sh --debug --install-system-deps klee && chown -R klee:klee /tmp/klee_build* + ENV PATH="$PATH:/tmp/llvm-60-install_O_D_A/bin:/home/klee/klee_build/bin" ENV BASE=/tmp -# Copy across source files needed for build -# Set klee user to be owner -ADD --chown=klee:klee / ${BASE}/klee_src USER klee WORKDIR /home/klee |