mirror of
https://gitee.com/kennylee/docker.git
synced 2024-11-29 18:38:34 +08:00
新增supervisord的docker化容器
This commit is contained in:
parent
83b259b018
commit
1e321f3331
@ -7,5 +7,6 @@
|
||||
* 默认163镜像源。
|
||||
* 中国时区。
|
||||
* 中文语言包
|
||||
* 安装logstash插件: gelf
|
||||
|
||||
|
||||
|
@ -1,20 +1,20 @@
|
||||
version: '2'
|
||||
services:
|
||||
web:
|
||||
build: nginx
|
||||
container_name: "gitbook-web"
|
||||
image: registry.cn-hangzhou.aliyuncs.com/kennylee/nginx:alpine-1.11.9
|
||||
container_name: "nginx"
|
||||
ports:
|
||||
- "3022:80"
|
||||
- "80:80"
|
||||
volumes:
|
||||
- ./data/html/:/usr/share/nginx/html
|
||||
environment:
|
||||
- TZ=Asia/Shanghai
|
||||
- ./nginx/conf/nginx.conf:/etc/nginx/nginx.conf
|
||||
- ./nginx/conf/conf.d/:/etc/nginx/conf.d/
|
||||
restart: always
|
||||
ftp:
|
||||
build: ftp
|
||||
container_name: "gitbook-ftp"
|
||||
ports:
|
||||
- "3021:21"
|
||||
- "21:21"
|
||||
- "30000-30009:30000-30009"
|
||||
volumes:
|
||||
- ./data/html/:/usr/share/nginx/html
|
||||
|
@ -1,43 +0,0 @@
|
||||
# Http Proxy
|
||||
#
|
||||
# see also https://github.com/nginxinc/docker-nginx
|
||||
# Authoer: kennylee26
|
||||
# NAME: kennylee26/httpproxy
|
||||
# Command format: Instruction [arguments command] ..
|
||||
|
||||
# 第一行必须指定基于的基础镜像
|
||||
FROM registry.alauda.cn/kenny/docker-nginx
|
||||
|
||||
# 维护者信息
|
||||
MAINTAINER kennylee26 <kennylee26@gmail.com>
|
||||
|
||||
ENV EGINX_HOME=/etc/nginx
|
||||
|
||||
RUN echo "deb http://mirrors.163.com/debian/ jessie main non-free contrib\n\
|
||||
deb http://mirrors.163.com/debian/ jessie-updates main non-free contrib\n\
|
||||
deb http://mirrors.163.com/debian/ jessie-backports main non-free contrib\n\
|
||||
deb-src http://mirrors.163.com/debian/ jessie main non-free contrib\n\
|
||||
deb-src http://mirrors.163.com/debian/ jessie-updates main non-free contrib\n\
|
||||
deb-src http://mirrors.163.com/debian/ jessie-backports main non-free contrib\n\
|
||||
deb http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib\n\
|
||||
deb-src http://mirrors.163.com/debian-security/ jessie/updates main non-free contrib\n\
|
||||
deb http://ftp.cn.debian.org/debian jessie main" > /etc/apt/sources.list
|
||||
|
||||
RUN apt-get -y update
|
||||
# recommend
|
||||
RUN apt-get install -y \
|
||||
curl vim wget
|
||||
|
||||
# clean
|
||||
RUN apt-get clean && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
VOLUME ["/var/cache/nginx"]
|
||||
# web resource
|
||||
VOLUME /usr/share/nginx/html
|
||||
|
||||
ADD default.conf $EGINX_HOME/conf.d/
|
||||
|
||||
EXPOSE 80 443
|
||||
|
||||
CMD ["nginx", "-g", "daemon off;"]
|
31
nginx-pureftpd/nginx/config/nginx.conf
Normal file
31
nginx-pureftpd/nginx/config/nginx.conf
Normal file
@ -0,0 +1,31 @@
|
||||
user nginx;
|
||||
worker_processes 1;
|
||||
|
||||
error_log /var/log/nginx/error.log warn;
|
||||
pid /var/run/nginx.pid;
|
||||
|
||||
|
||||
events {
|
||||
worker_connections 1024;
|
||||
}
|
||||
|
||||
|
||||
http {
|
||||
include /etc/nginx/mime.types;
|
||||
default_type application/octet-stream;
|
||||
|
||||
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
|
||||
'$status $body_bytes_sent "$http_referer" '
|
||||
'"$http_user_agent" "$http_x_forwarded_for"';
|
||||
|
||||
access_log /var/log/nginx/access.log main;
|
||||
|
||||
sendfile on;
|
||||
#tcp_nopush on;
|
||||
|
||||
keepalive_timeout 65;
|
||||
|
||||
#gzip on;
|
||||
|
||||
include /etc/nginx/conf.d/*.conf;
|
||||
}
|
19
supervisord/Dockerfile
Executable file
19
supervisord/Dockerfile
Executable file
@ -0,0 +1,19 @@
|
||||
# Ubuntu
|
||||
#
|
||||
# Base Docker Image http://dockerfile.github.io/#/ubuntu
|
||||
# Authoer: kennylee26
|
||||
|
||||
FROM registry.cn-hangzhou.aliyuncs.com/kennylee/ubuntu
|
||||
|
||||
MAINTAINER kennylee26 <kennylee26@gmail.com>
|
||||
|
||||
# Install.
|
||||
RUN \
|
||||
apt-get update && \
|
||||
apt-get install -y inetutils-ping net-tools dnsutils supervisor && \
|
||||
rm -rf /var/lib/apt/lists/*
|
||||
|
||||
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
|
||||
|
||||
# Define default command.
|
||||
CMD ["/usr/bin/supervisord"]
|
3
supervisord/supervisord.conf
Normal file
3
supervisord/supervisord.conf
Normal file
@ -0,0 +1,3 @@
|
||||
[supervisord]
|
||||
nodaemon=true
|
||||
|
Loading…
Reference in New Issue
Block a user