Add catch all server with default error page
This commit is contained in:
parent
270c2b97fc
commit
f28132bd23
@ -5,6 +5,9 @@ MAINTAINER Joachim Lusiardi
|
||||
RUN apt-get update; \
|
||||
apt-get install -y nginx;
|
||||
|
||||
RUN mkdir /default
|
||||
ADD index.html /default/index.html
|
||||
RUN chmod -R 777 /default
|
||||
ADD nginx.conf /etc/nginx.conf
|
||||
ADD start.sh /start.sh
|
||||
RUN chmod +x /start.sh
|
||||
|
10
index.html
Normal file
10
index.html
Normal file
@ -0,0 +1,10 @@
|
||||
<html>
|
||||
<head>
|
||||
<title>Ooops - Not found</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<h1>Ooops - Not found</h1>
|
||||
<h2>Sorry, the requested page was not found!</h2>
|
||||
</body>
|
||||
</html>
|
@ -11,6 +11,15 @@ http {
|
||||
log_format http_combined '$remote_addr - $remote_user [$time_local] "$request" $status $body_bytes_sent "$http_referer" "$http_user_agent" HTTP';
|
||||
|
||||
include /tmp/nginx/*;
|
||||
|
||||
server {
|
||||
listen *:80 default_server;
|
||||
root /default;
|
||||
index index.html;
|
||||
location / {
|
||||
try_files $uri /index.html;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
daemon on;
|
||||
|
@ -171,6 +171,8 @@ if __name__ == '__main__':
|
||||
line_str = line.decode("utf-8")
|
||||
event = json.loads(line_str)
|
||||
|
||||
if not 'id' in event:
|
||||
continue
|
||||
container_id = event['id']
|
||||
try:
|
||||
inspect_data = client.inspect_container(container_id)
|
||||
|
Loading…
Reference in New Issue
Block a user