diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..951ecc9 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,11 @@ +FROM alpine + +MAINTAINER Alexander Zierhut +LABEL maintainer="info@zierhut-it.de" + +RUN apk add --no-cache git composer openssl php-common php-bcmath php-json php-mbstring php-tokenizer + +WORKDIR /obfuscate +RUN git clone https://github.com/naneau/php-obfuscator . && composer install + +ENTRYPOINT ["/obfuscate/bin/obduscate" "obfuscate"] \ No newline at end of file diff --git a/README.md b/README.md index ae70563..761b15d 100644 --- a/README.md +++ b/README.md @@ -45,3 +45,18 @@ You can run the obfuscator with a configuration file through ```bash ./bin/obfuscate obfuscate /input/directory /output/directory --config=/foo/bar/config.yml ``` + +## Docker Support +### Usage +There is a docker image of this project. You could use it to implement obfuscation into your CI processes. It can be found here. It is called `zierhutit/naneau-php-obfuscator/`. + +### Drone CI +Example Configuration: +```YAML +- name: Obfuscation + image: zierhutit/naneau-php-obfuscator + commands: + - mkdir /drone/src-tmp + - cp -rf /drone/src/* /drone/src-tmp + - /obfuscate/bin/obfuscate obfuscate /drone/src-tmp /drone/src +``` \ No newline at end of file