Skip to content

Commit

Permalink
Reorganise Dockerfile to have KLEE user own the build directory
Browse files Browse the repository at this point in the history
  • Loading branch information
MartinNowack authored and ccadar committed Dec 19, 2019
1 parent d67b910 commit 4ea6ee4
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -2,3 +2,4 @@
autom4te.cache
**/.*.swp
Dockerfile
cmake-*/
14 changes: 8 additions & 6 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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
Expand Down

0 comments on commit 4ea6ee4

Please sign in to comment.