[~] Refactor
This commit is contained in:
		
							parent
							
								
									844b6bdcc7
								
							
						
					
					
						commit
						c9c24b2c12
					
				@ -80,12 +80,12 @@ try:
 | 
			
		||||
        sys.stdout.flush()
 | 
			
		||||
    elif sys.argv[1] == 'http-server':
 | 
			
		||||
        subprocess.check_call(r'''
 | 
			
		||||
            sudo docker run
 | 
			
		||||
                -p 80:80
 | 
			
		||||
                -u root
 | 
			
		||||
                -it --entrypoint=/bin/bash
 | 
			
		||||
                -v $PWD:/app:ro
 | 
			
		||||
                nginx:latest
 | 
			
		||||
            sudo docker run \
 | 
			
		||||
                -p 80:80 \
 | 
			
		||||
                -u root \
 | 
			
		||||
                -it --entrypoint=/bin/bash \
 | 
			
		||||
                -v $PWD:/app:ro \
 | 
			
		||||
                nginx:latest \
 | 
			
		||||
                -c 'echo "server{listen 80; root /app; location / {autoindex on;}}" > /etc/nginx/conf.d/default.conf; nginx -g "daemon off;"'
 | 
			
		||||
        ''', shell=True)
 | 
			
		||||
    else:
 | 
			
		||||
 | 
			
		||||
		Loading…
	
		Reference in New Issue
	
	Block a user