mirror of
https://github.com/rectorphp/rector.git
synced 2024-06-26 20:53:31 +00:00
Added secured docker image
This commit is contained in:
parent
1f4b36dfed
commit
e5b092d97c
11
.docker/php/security.ini
Normal file
11
.docker/php/security.ini
Normal file
|
@ -0,0 +1,11 @@
|
|||
# inspired by https://www.cyberciti.biz/tips/php-security-best-practices-tutorial.html
|
||||
|
||||
disable_functions = "exec, passthru, shell_exec, system, proc_open, popen, curl_exec, curl_multi_exec, parse_ini_file, show_source"
|
||||
|
||||
allow_url_fopen = off
|
||||
allow_url_include = off
|
||||
file_uploads = off
|
||||
|
||||
post_max_size = 256k
|
||||
|
||||
open_basedir="/project/:/rector/:/tmp/"
|
10
Dockerfile
10
Dockerfile
|
@ -7,10 +7,16 @@ COPY stubs stubs
|
|||
RUN composer install --no-dev --optimize-autoloader --prefer-dist
|
||||
|
||||
|
||||
FROM php:7.4-cli
|
||||
FROM php:7.4-cli as rector
|
||||
WORKDIR /rector
|
||||
|
||||
COPY . .
|
||||
COPY --from=composer /app .
|
||||
COPY . .
|
||||
|
||||
ENTRYPOINT [ "bin/rector" ]
|
||||
|
||||
|
||||
## Used for getrector.org/demo
|
||||
FROM rector as rector-secured
|
||||
|
||||
COPY .docker/php/security.ini /usr/local/etc/php/conf.d/security.ini
|
||||
|
|
Loading…
Reference in New Issue
Block a user