Directorio de artículos
Usar contenedor de reacción
docker run -d -p 20080:80 --name nginxCoCoTF registry.cn-hangzhou.aliyuncs.com/mkmk/nginx:ReactCocoTF
contenedor bootstarp js
docker run -d -p 30080:80 --name nginxtfjsssd registry.cn-hangzhou.aliyuncs.com/mkmk/nginx:tfjsssd
configuración de nginx
docker run -d -p 10080: 80 --nombre nginx1 nginx
docker exec -it nginx1 / bin / bash
buscar / -nombre " 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;
}
copiar construir
docker cp build / nginx1: / usr / share / nginx / html / build
reemplazar
sed -i 's? / usr / share / nginx / html? / usr / share / nginx / html / build? g' /etc/nginx/nginx.conf
cat </etc/nginx/nginx.conf
Espejo de producto terminado
registration.cn-hangzhou.aliyuncs.com/mkmk/nginx:ReactCocoTF
docker run -d -p 20080: 80 --nombre nginxCoCoTF registro.cn-hangzhou.aliyuncs.com/mkmk/nginx:ReactCocoTF
Comprimir archivos enviados
zip -r directorio comprimido. zip directorio de origen / -x directorio descargado -x "cloud_backweb / download / wordfile / *"