mirror of
https://github.com/prasathmani/tinyfilemanager.git
synced 2025-08-10 18:54:35 +02:00
feat: add Dockerfile and auto publish. (#619)
This commit is contained in:
32
Dockerfile
Normal file
32
Dockerfile
Normal file
@@ -0,0 +1,32 @@
|
||||
# how to build?
|
||||
# docker login
|
||||
## .....input your docker id and password
|
||||
#docker build . -t prasathmani/tinyfilemanager:master
|
||||
#docker push prasathmani/tinyfilemanager:master
|
||||
|
||||
# how to use?
|
||||
# docker run -d -v /absolute/path:/var/www/html/data -p 80:80 --restart=always --name tinyfilemanager prasathmani/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 \
|
||||
mbstring \
|
||||
iconv \
|
||||
fileinfo
|
||||
|
||||
WORKDIR /var/www/html
|
||||
|
||||
COPY tinyfilemanager.php index.php
|
||||
COPY config-sample.php config.php
|
||||
RUN sed -i "s/\$root_path =.*;/\$root_path = \$_SERVER['DOCUMENT_ROOT'].'\/data';/g" config.php && \
|
||||
sed -i "s/\$root_url = '';/\$root_url = 'data\/';/g" config.php
|
||||
|
||||
CMD ["sh", "-c", "php -S 0.0.0.0:80"]
|
Reference in New Issue
Block a user