您的位置 首页 docker

entrypoint.sh

使用:


EXPOSE 10053/TCP

WORKDIR /var/lib/zabbix

COPY ["docker-entrypoint.sh", "/usr/local/bin/"]
RUN chmod +x /usr/local/bin/docker-entrypoint.sh

ENTRYPOINT ["docker-entrypoint.sh"]

USER 1997

CMD ["/usr/sbin/zabbix_web_service", "-c", "/etc/zabbix/zabbix_web_service.conf"]

 

 

entrypoint.sh

 

cat /entrypoint.sh 
#!/bin/sh
# auther: JasonYin
# email: y1053419035@qq.com
# blog: https://www.cnblogs.com/baimei/

# 创建nginx子配置文件目录
mkdir -pv /etc/nginx/conf.d

# 创建nginx的游戏配置文件
cat > /etc/nginx/conf.d/games.conf <<EOF
server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/bird/;
    server_name   game01.baimei.com;
}
server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/pinshu/;
    server_name   game02.baimei.com;
}

server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/tanke/;
    server_name   game03.baimei.com;
}

server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/chengbao/;
    server_name   game04.baimei.com;
}

server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/motuo/;
    server_name   game05.baimei.com;
}

server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/liferestart/;
    server_name   game06.baimei.com;
}

server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/huangjinkuanggong/;
    server_name   game07.baimei.com;
}

server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/feijidazhan/;
    server_name   game08.baimei.com;
}

server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/zhiwudazhanjiangshi/;
    server_name   game09.baimei.com;
}

server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/xiaobawang/;
    server_name   game10.baimei.com;
}
server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/pingtai/;
    server_name   game11.baimei.com;
}

server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/dayu/;
    server_name   game12.baimei.com;
}
server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/maliao/;
    server_name   game13.baimei.com;
}
server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/menghuanmonizhan/;
    server_name   game14.baimei.com;
}
server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/qieshuiguo/;
    server_name   game15.baimei.com;
}
server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/wangzhezhicheng/;
    server_name   game16.baimei.com;
}
server {
    listen        ${IP:-0.0.0.0}:${PORT:-80};
    root          ${DATA_DIR:-/usr/local/nginx/html}/zhiwuVSjiangshi/;
    server_name   game17.baimei.com;
}
EOF

# 创建完成nginx子配置文件后,再去执行当前脚本后面的参数
exec "$@"

 

欢迎来撩 : 汇总all

白眉大叔

关于白眉大叔linux云计算: 白眉大叔

热门文章