FROM ubuntu:16.04
LABEL maintainer="[email protected]"
RUN \
apt-get update -y && \
apt-get install -y apt-utils iproute2 vim curl git && \
apt-get install -y nginx supervisor && \
apt-get install -y php7.0 php7.0-curl php7.0-gd php7.0-mbstring && \
rm -rf /var/lib/apt/lists/* && \
rm -f /etc/nginx/sites-enabled/default && \
rm -f /etc/nginx/sites-available/default && \
cd /var/www/html && rm -f index.nginx-debian.html && \
git clone https://github.com/kalcaddle/KodExplorer.git && \
chown -R www-data:www-data /var/www/html/KodExplorer/ && \
mkdir /run/php
ADD nginx-kodexplorer.conf /etc/nginx/conf.d/kodexplorer.conf
ADD supervisor-kodexplorer.conf /etc/supervisor/conf.d/kodexplorer.conf
EXPOSE 8888
CMD ["/usr/bin/supervisord", "-n"]
vim nginx-kodexplorer.conf
server {
listen 8888 default_server;
root /var/www/html/kodexplorer/;
# Add index.php to the list if you are using PHP
index index.php index.html;
server_name _;
location / {
root /var/www/html/KodExplorer/;
}
location ~ \.php$ {
include /etc/nginx/fastcgi_params;
if ($uri !~ "^/images/") {
fastcgi_pass unix:/run/php/php7.0-fpm.sock;
}
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME /var/www/html/KodExplorer/$fastcgi_script_name;
}
}
vim supervisor-kodexplorer.conf
[program:php-fpm]
command=/usr/sbin/php-fpm7.0 --fpm-config /etc/php/7.0/fpm/php-fpm.conf -F
process_name=%(program_name)s
autostart=true
autorestart=true
startretries=3
[program:nginx]
command=/usr/sbin/nginx -g "daemon off;"
process_name=%(program_name)s
autostart=true
autorestart=true
startretries=3
# how to use it
chown -R www-data:www-data /DATA/kodexplorer/data
docker run -d --name kodexplorer -p 8888:8888 -v /DATA/kodexplorer/data:/var/www/html/KodExplorer/data/User twoyang0917/kodexplorer:latest
# endpoint
http://127.0.0.1:8888/
Content type
Image
Digest
Size
183.1 MB
Last updated
almost 9 years ago
docker pull twoyang0917/kodexplorer