Skip to content

Commit

Permalink
Merge pull request #1 from guardrailsio/feat/add-dockerfile
Browse files Browse the repository at this point in the history
Create Dockerfile
  • Loading branch information
streichsbaer authored Dec 12, 2018
2 parents 8e8cd1c + fd6c39e commit e022bd4
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
FROM composer:latest

# add unpriviledged user and
# create directory for the code to be scanned
RUN addgroup -S tool && adduser -S -G tool tool && \
mkdir -p /opt/mount/

# Install phpcs-security-audit
RUN composer global require pheromone/phpcs-security-audit
WORKDIR /tmp
RUN sh ./vendor/pheromone/phpcs-security-audit/symlink.sh

# change user
USER tool

ENTRYPOINT [ "/tmp/vendor/bin/phpcs", "--standard=/tmp/vendor/pheromone/phpcs-security-audit/example_base_ruleset.xml", "/opt/mount/"]

0 comments on commit e022bd4

Please sign in to comment.