稽核和資金監管容器化
阿新 • • 發佈:2022-04-21
# 阿里雲幫助文件參考: # https://yq.aliyun.com/articles/110806?spm=a2c1q.8351553.0.0.11b720beQRyGTx # 官網安裝參考:https://docs.docker.com/install/linux/docker-ce/centos/ # 安裝依賴外掛 yum install -y yum-utils device-mapper-persistent-data lvm2 # 設定即將安裝的是穩定版倉庫 # 官方倉庫 #yum-config-manager --add-repo http://download.docker.com/linux/centos/docker-ce.repo# 阿里倉庫 yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo yum makecache fast # 檢視倉庫中所有的 docker 版本 yum list docker-ce --showduplicates | sort -r # 安裝 yum install docker-ce -y mkdir /etc/docker cat > /etc/docker/daemon.json <<EOF { "registry-mirrors": ["https://mirror.aliyuncs.com","https://mirror.baidubce.com", "http://docker.mirrors.ustc.edu.cn", "http://hub-mirror.c.163.com"] } EOF docker -v systemctl restart docker systemctl enable docker # docker 安裝時預設建立了 docker 使用者組 # 將普通使用者加入 docker 使用者組就可以不使用 sudo 來操作 docker # sudo usermod -aG docker [使用者名稱] # 退出控制檯重新登入,或者 # newgrp - docker docker pull centos:7.8.2003 docker.io/library/centos:7.8.2003 docker run -dit -p 8080:80 -v /usr/local/php:/usr/local/php \ -v /data/www:/data/www \ -v /usr/local/nginx:/usr/local/nginx \ -v /usr/local/lib:/usr/local/lib \ -v /usr/lib64:/usr/lib64 \ -v /etc/ld.so.conf.d:/etc/ld.so.conf.d \ -v /usr/local/freetype:/usr/local/freetype \ -v /etc/localtime:/etc/localtime \ --name=bpit_supervision_fyl afb6fca791e0 /bin/bash docker run -dit -p 8080:80 -v /usr/local/php:/usr/local/php \ -v /data/www:/data/www \ -v /usr/local/nginx:/usr/local/nginx \ -v /etc/localtime:/etc/localtime \ --name=bpit_supervision_fyl afb6fca791e0 /bin/bash #檢視php執行資訊 php -i docker commit -m 'bpit_supervision_fyl' bpit_supervision_fyl bpit_supervision_fyl:v1.1.2 docker stop bpit_supervision_fyl docker rm bpit_supervision_fyl docker image list docker save -o b.tar e6e43c555424 docker load < b.tar [program:php-fpm] command = /usr/local/php/sbin/php-fpm -R --force-stderr --nodaemonize --fpm-config /usr/local/php/etc/php-fpm.d/www.conf autostart=true autorestart=true priority=5 stdout_events_enabled=true stderr_events_enabled=true stdout_logfile=/usr/local/openresty/nginx/logs/php-fpm_out.log stdout_logfile_maxbytes=0 stderr_logfile=/usr/local/openresty/nginx/logs/php-fpm_error.log stderr_logfile_maxbytes=0 stopsignal=QUIT [program:nginx] command=/usr/local/openresty/nginx/sbin/nginx -g "daemon off; error_log /dev/stderr info;" autostart=true autorestart=true priority=10 stdout_events_enabled=true stderr_events_enabled=true stdout_logfile=/usr/local/openresty/nginx/logs/nginx_out.log stdout_logfile_maxbytes=0 stderr_logfile=/usr/local/openresty/nginx/logs/nginx_error.log stderr_logfile_maxbytes=0 stopsignal=QUIT
# 阿里雲幫助文件參考: # https://yq.aliyun.com/articles/110806?spm=a2c1q.8351553.0.0.11b720beQRyGTx # 官網安裝參考:https://docs.docker.com/install/linux/docker-ce/centos/ # 安裝依賴外掛 yum install -y yum-utils device-mapper-persistent-data lvm2 # 設定即將安裝的是穩定版倉庫 # 官方倉庫 #yum-config-manager --add-repo http://download.docker.com/linux/centos/docker-ce.repo # 阿里倉庫 yum-config-manager --add-repo http://mirrors.aliyun.com/docker-ce/linux/centos/docker-ce.repo yum makecache fast # 檢視倉庫中所有的 docker 版本 yum list docker-ce --showduplicates | sort -r # 安裝 yum install docker-ce -y mkdir /etc/docker cat > /etc/docker/daemon.json <<EOF { "registry-mirrors": ["https://mirror.aliyuncs.com","https://mirror.baidubce.com", "http://docker.mirrors.ustc.edu.cn", "http://hub-mirror.c.163.com"] } EOF docker -v systemctl restart docker systemctl enable docker # docker 安裝時預設建立了 docker 使用者組 # 將普通使用者加入 docker 使用者組就可以不使用 sudo 來操作 docker # sudo usermod -aG docker [使用者名稱] # 退出控制檯重新登入,或者 # newgrp - docker docker pull centos:7.8.2003 docker.io/library/centos:7.8.2003 docker run -dit -p 8080:80 -v /usr/local/php:/usr/local/php \ -v /usr/local/openresty:/usr/local/openresty \ -v /home/www/bpit_audit_fyl:/home/www/bpit_audit_fyl \ -v /usr/local/libiconv:/usr/local/libiconv \ -v /usr/lib64:/usr/lib64 \ -v /usr/lib/oracle:/usr/lib/oracle \ -v /etc/localtime:/etc/localtime \ -v /root/anaconda:/root/anaconda \ -v /etc/supervisord.d:/etc/supervisord.d \ --name=bpit_audit_fyl e6e43c555424 supervisord -n -c /etc/supervisord.conf #檢視php執行資訊 php -i docker commit -m 'bpit_audit_fyl' bpit_audit_fyl bpit_audit_fyl:v1.1.2 docker stop bpit_audit_fyl docker rm bpit_audit_fyl docker image list REPOSITORY TAG IMAGE ID CREATED SIZE bpit_audit_fyl v1.1.2 e6e43c555424 35 minutes ago 681MB bpit_audit_fyl v1.1.1 54738088fb41 17 hours ago 681MB centos 7.8.2003 afb6fca791e0 23 months ago 203MB docker save -o b.tar e6e43c555424 docker load < b.tar [program:php-fpm] command = /usr/local/php/sbin/php-fpm -R --force-stderr --nodaemonize --fpm-config /usr/local/php/etc/php-fpm.d/www.conf autostart=true autorestart=true priority=5 stdout_events_enabled=true stderr_events_enabled=true stdout_logfile=/usr/local/openresty/nginx/logs/php-fpm_out.log stdout_logfile_maxbytes=0 stderr_logfile=/usr/local/openresty/nginx/logs/php-fpm_error.log stderr_logfile_maxbytes=0 stopsignal=QUIT [program:nginx] command=/usr/local/openresty/nginx/sbin/nginx -g "daemon off; error_log /dev/stderr info;" autostart=true autorestart=true priority=10 stdout_events_enabled=true stderr_events_enabled=true stdout_logfile=/usr/local/openresty/nginx/logs/nginx_out.log stdout_logfile_maxbytes=0 stderr_logfile=/usr/local/openresty/nginx/logs/nginx_error.log stderr_logfile_maxbytes=0 stopsignal=QUIT