Skip to content

Commit

Permalink
Merge pull request #244 from yxliang01/docker-improvement
Browse files Browse the repository at this point in the history
feat: docker improvement
  • Loading branch information
montyly authored Nov 6, 2019
2 parents 1faa5c2 + b22799c commit b6f8231
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
1 change: 1 addition & 0 deletions .dockerignore
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Dockerfile
10 changes: 7 additions & 3 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,15 @@ RUN wget https://github.com/ethereum/solidity/releases/download/v0.4.25/solc-sta
&& chmod +x solc-static-linux \
&& mv solc-static-linux /usr/bin/solc

RUN useradd -m slither
USER slither

# If this fails, the solc-static-linux binary has changed while it should not.
RUN [ "c9b268750506b88fe71371100050e9dd1e7edcf8f69da34d1cd09557ecb24580 /usr/bin/solc" = "$(sha256sum /usr/bin/solc)" ]

RUN git clone https://github.com/trailofbits/slither.git
WORKDIR slither
COPY --chown=slither:slither . /home/slither/slither
WORKDIR /home/slither/slither

RUN python3 setup.py install
RUN python3 setup.py install --user
ENV PATH="/home/slither/.local/bin:${PATH}"
CMD /bin/bash

0 comments on commit b6f8231

Please sign in to comment.