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