New container react tf

Use react container

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

Insert picture description here

js bootstarp container

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

Insert picture description here

nginx config

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

docker exec -it nginx1 /bin/bash

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

copy build

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

replace

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

Finished product mirror

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

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

Compress dispatched files

zip -r compressed directory. zip source directory/ -x discharged directory -x "cloud_backweb/download/wordfile/*"

Guess you like

Origin blog.csdn.net/qq_43373608/article/details/107338075