新しいコンテナはtfに反応します

反応容器を使用する

docker  run -d -p 20080:80 --name nginxCoCoTF  registry.cn-hangzhou.aliyuncs.com/mkmk/nginx:ReactCocoTF

ここに写真の説明を挿入

jsbootstarpコンテナ

docker  run -d -p 30080:80 --name nginxtfjsssd  registry.cn-hangzhou.aliyuncs.com/mkmk/nginx:tfjsssd

ここに写真の説明を挿入

nginx構成

docker run -d -p 10080:80 --name nginx1 nginx

docker exec -it nginx1 / bin / bash

検索/-name「nginx.conf

/etc/nginx/nginx.conf

user  nginx;
worker_processes  1;

error_log  /var/log/nginx/error.log warn;
pid        /var/run/nginx.pid;


events {
    
    
    worker_connections  1024;
}


http {
    
    

  server {
    
    
    listen       80;
    server_name  localhost;
    location / {
    
    
        root   /usr/share/nginx/html/build;
        index  index.html index.htm;
    }
  }

    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;
}

コピービルド

docker cp build / nginx1:/ usr / share / nginx / html / build

交換

sed -i's?/ usr / share / nginx / html?/ usr / share / nginx / html / build?g '/etc/nginx/nginx.conf
cat < / etc / nginx / nginx.conf

完成品ミラー

Registry.cn-hangzhou.aliyuncs.com/mkmk/nginx:ReactCocoTF

docker run -d -p 20080:80 --name nginxCoCoTF Registry.cn-hangzhou.aliyuncs.com/mkmk/nginx:ReactCocoTF

ディスパッチされたファイルを圧縮する

zip-r圧縮ディレクトリ。zipソースディレクトリ/ -x排出ディレクトリ-x "cloud_backweb / download / wordfile / *"

おすすめ

転載: blog.csdn.net/qq_43373608/article/details/107338075