Docker deployment web page refers to the configuration of nginx

recently deployed web pages with docker, but I encountered a problem as follows:
when normal deployment, that is, no docker is used, the configuration of the configuration file under nginx"s site-enabled is as follows

server {
    charset utf-8;
    listen 80;
    server_name windystreet.cn;
    
    location /static {
    alias /var/www/static;
    }
    location / {
    proxy_set_header Host $host;
    proxy_pass http://unix:/tmp/windystreet.cn.socket;

    }
}

when using docker deployment, it seems that for the online tutorials, I should need to change the configuration file, and only change the server_name, as follows

server {
    charset utf-8;
    listen 80;
    server_name localhost;
    
    location /static {
    alias /var/www/static;
    }
    location / {
    proxy_set_header Host $host;
    proxy_pass http://unix:/tmp/windystreet.cn.socket;

    }
}

but when I run

docker run -it -p 80:80 xxx(id) /bin/bash

when you open a web page, you cannot load a static file? How can I be an agent?


your static file directory is not mapped. Now you are using the directory in docker


run docker run-it-p 80:80-v / var/www/static:/var/www/static xxx (container id) / bin/bash

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36e9c-2c07d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36e9c-2c07d.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?