forked from prasathmani/tinyfilemanager
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Dockerfile
28 lines (20 loc) · 820 Bytes
/
Dockerfile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
# how to build?
# docker login
## .....input your docker id and password
#docker build . -t tinyfilemanager/tinyfilemanager:master
#docker push tinyfilemanager/tinyfilemanager:master
# how to use?
# docker run -d -v /absolute/path:/var/www/html/data -p 80:80 --restart=always --name tinyfilemanager tinyfilemanager/tinyfilemanager:master
FROM php:7.4-cli-alpine
# if run in China
# RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.aliyun.com/g' /etc/apk/repositories
RUN apk add \
libzip-dev \
oniguruma-dev
RUN docker-php-ext-install \
zip
WORKDIR /var/www/html
COPY tinyfilemanager.php index.php
RUN sed -i "s/\$root_path =.*;/\$root_path = \$_SERVER['DOCUMENT_ROOT'].'\/data';/g" index.php && \
sed -i "s/\$root_url = '';/\$root_url = 'data\/';/g" index.php
CMD ["sh", "-c", "php -S 0.0.0.0:80"]