Browse Source
			
			
			Merge pull request #1321 from mkilchhofer/feature/improve_shutdown_behavior
			
				Improve shutdown behavior (on kubernetes and allow CTRL+C)
			
			
				pull/1327/head
			
			
		 
		
			
				
					
						 Daniel García
					
					5 years ago
						Daniel García
					
					5 years ago
					
						
							committed by
							
								 GitHub
								GitHub
							
						 
					
				 
				
			 
		 
		
			
				
					
					No known key found for this signature in database
					
						
							GPG Key ID: 4AEE18F83AFDEB23
						
					
				
			
		
		
		
	
		
			
				 7 changed files with 
16 additions and 
15 deletions
			 
			
		 
		
			
				- 
					
					
					 
					docker/Dockerfile.j2
				
- 
					
					
					 
					docker/amd64/Dockerfile
				
- 
					
					
					 
					docker/amd64/Dockerfile.alpine
				
- 
					
					
					 
					docker/arm64/Dockerfile
				
- 
					
					
					 
					docker/armv6/Dockerfile
				
- 
					
					
					 
					docker/armv7/Dockerfile
				
- 
					
					
					 
					docker/armv7/Dockerfile.alpine
				
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -204,6 +204,7 @@ RUN [ "cross-build-start" ] | 
			
		
	
		
		
			
				
					|  |  | RUN apk add --no-cache \ |  |  | RUN apk add --no-cache \ | 
			
		
	
		
		
			
				
					|  |  |         openssl \ |  |  |         openssl \ | 
			
		
	
		
		
			
				
					|  |  |         curl \ |  |  |         curl \ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         dumb-init \ | 
			
		
	
		
		
			
				
					|  |  | {%   if "sqlite" in features %} |  |  | {%   if "sqlite" in features %} | 
			
		
	
		
		
			
				
					|  |  |         sqlite \ |  |  |         sqlite \ | 
			
		
	
		
		
			
				
					|  |  | {%   endif %} |  |  | {%   endif %} | 
			
		
	
	
		
		
			
				
					|  | @ -220,14 +221,12 @@ RUN apt-get update && apt-get install -y \ | 
			
		
	
		
		
			
				
					|  |  |     openssl \ |  |  |     openssl \ | 
			
		
	
		
		
			
				
					|  |  |     ca-certificates \ |  |  |     ca-certificates \ | 
			
		
	
		
		
			
				
					|  |  |     curl \ |  |  |     curl \ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     dumb-init \ | 
			
		
	
		
		
			
				
					|  |  |     sqlite3 \ |  |  |     sqlite3 \ | 
			
		
	
		
		
			
				
					|  |  |     libmariadb-dev-compat \ |  |  |     libmariadb-dev-compat \ | 
			
		
	
		
		
			
				
					|  |  |     libpq5 \ |  |  |     libpq5 \ | 
			
		
	
		
		
			
				
					|  |  |     && rm -rf /var/lib/apt/lists/* |  |  |     && rm -rf /var/lib/apt/lists/* | 
			
		
	
		
		
			
				
					|  |  | {% endif %} |  |  | {% endif %} | 
			
		
	
		
		
			
				
					|  |  | {% if "alpine" in target_file and "armv7" in target_file %} |  |  |  | 
			
		
	
		
		
			
				
					|  |  | RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/community catatonit |  |  |  | 
			
		
	
		
		
			
				
					|  |  | {% endif %} |  |  |  | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | RUN mkdir /data |  |  | RUN mkdir /data | 
			
		
	
		
		
			
				
					|  |  | {% if "amd64" not in target_file %} |  |  | {% if "amd64" not in target_file %} | 
			
		
	
	
		
		
			
				
					|  | @ -256,8 +255,5 @@ HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # Configures the startup! |  |  | # Configures the startup! | 
			
		
	
		
		
			
				
					|  |  | WORKDIR / |  |  | WORKDIR / | 
			
		
	
		
		
			
				
					
					|  |  | {% if "alpine" in target_file and "armv7" in target_file %} |  |  | ENTRYPOINT ["/usr/bin/dumb-init", "--"] | 
			
				
				
			
		
	
		
		
			
				
					|  |  | CMD ["catatonit", "/start.sh"] |  |  |  | 
			
		
	
		
		
			
				
					|  |  | {% else %} |  |  |  | 
			
		
	
		
		
	
		
		
			
				
					|  |  | CMD ["/start.sh"] |  |  | CMD ["/start.sh"] | 
			
		
	
		
		
			
				
					|  |  | {% endif %} |  |  |  | 
			
		
	
	
		
		
			
				
					|  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -78,6 +78,7 @@ RUN apt-get update && apt-get install -y \ | 
			
		
	
		
		
			
				
					|  |  |     openssl \ |  |  |     openssl \ | 
			
		
	
		
		
			
				
					|  |  |     ca-certificates \ |  |  |     ca-certificates \ | 
			
		
	
		
		
			
				
					|  |  |     curl \ |  |  |     curl \ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     dumb-init \ | 
			
		
	
		
		
			
				
					|  |  |     sqlite3 \ |  |  |     sqlite3 \ | 
			
		
	
		
		
			
				
					|  |  |     libmariadb-dev-compat \ |  |  |     libmariadb-dev-compat \ | 
			
		
	
		
		
			
				
					|  |  |     libpq5 \ |  |  |     libpq5 \ | 
			
		
	
	
		
		
			
				
					|  | @ -101,5 +102,5 @@ HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # Configures the startup! |  |  | # Configures the startup! | 
			
		
	
		
		
			
				
					|  |  | WORKDIR / |  |  | WORKDIR / | 
			
		
	
		
		
			
				
					|  |  |  |  |  | ENTRYPOINT ["/usr/bin/dumb-init", "--"] | 
			
		
	
		
		
			
				
					|  |  | CMD ["/start.sh"] |  |  | CMD ["/start.sh"] | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  |  | 
			
		
	
	
		
		
			
				
					|  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -74,6 +74,7 @@ ENV SSL_CERT_DIR=/etc/ssl/certs | 
			
		
	
		
		
			
				
					|  |  | RUN apk add --no-cache \ |  |  | RUN apk add --no-cache \ | 
			
		
	
		
		
			
				
					|  |  |         openssl \ |  |  |         openssl \ | 
			
		
	
		
		
			
				
					|  |  |         curl \ |  |  |         curl \ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         dumb-init \ | 
			
		
	
		
		
			
				
					|  |  |         sqlite \ |  |  |         sqlite \ | 
			
		
	
		
		
			
				
					|  |  |         postgresql-libs \ |  |  |         postgresql-libs \ | 
			
		
	
		
		
			
				
					|  |  |         ca-certificates |  |  |         ca-certificates | 
			
		
	
	
		
		
			
				
					|  | @ -96,5 +97,5 @@ HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # Configures the startup! |  |  | # Configures the startup! | 
			
		
	
		
		
			
				
					|  |  | WORKDIR / |  |  | WORKDIR / | 
			
		
	
		
		
			
				
					|  |  |  |  |  | ENTRYPOINT ["/usr/bin/dumb-init", "--"] | 
			
		
	
		
		
			
				
					|  |  | CMD ["/start.sh"] |  |  | CMD ["/start.sh"] | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  |  | 
			
		
	
	
		
		
			
				
					|  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -121,6 +121,7 @@ RUN apt-get update && apt-get install -y \ | 
			
		
	
		
		
			
				
					|  |  |     openssl \ |  |  |     openssl \ | 
			
		
	
		
		
			
				
					|  |  |     ca-certificates \ |  |  |     ca-certificates \ | 
			
		
	
		
		
			
				
					|  |  |     curl \ |  |  |     curl \ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     dumb-init \ | 
			
		
	
		
		
			
				
					|  |  |     sqlite3 \ |  |  |     sqlite3 \ | 
			
		
	
		
		
			
				
					|  |  |     libmariadb-dev-compat \ |  |  |     libmariadb-dev-compat \ | 
			
		
	
		
		
			
				
					|  |  |     libpq5 \ |  |  |     libpq5 \ | 
			
		
	
	
		
		
			
				
					|  | @ -147,5 +148,5 @@ HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # Configures the startup! |  |  | # Configures the startup! | 
			
		
	
		
		
			
				
					|  |  | WORKDIR / |  |  | WORKDIR / | 
			
		
	
		
		
			
				
					|  |  |  |  |  | ENTRYPOINT ["/usr/bin/dumb-init", "--"] | 
			
		
	
		
		
			
				
					|  |  | CMD ["/start.sh"] |  |  | CMD ["/start.sh"] | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  |  | 
			
		
	
	
		
		
			
				
					|  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -121,6 +121,7 @@ RUN apt-get update && apt-get install -y \ | 
			
		
	
		
		
			
				
					|  |  |     openssl \ |  |  |     openssl \ | 
			
		
	
		
		
			
				
					|  |  |     ca-certificates \ |  |  |     ca-certificates \ | 
			
		
	
		
		
			
				
					|  |  |     curl \ |  |  |     curl \ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     dumb-init \ | 
			
		
	
		
		
			
				
					|  |  |     sqlite3 \ |  |  |     sqlite3 \ | 
			
		
	
		
		
			
				
					|  |  |     libmariadb-dev-compat \ |  |  |     libmariadb-dev-compat \ | 
			
		
	
		
		
			
				
					|  |  |     libpq5 \ |  |  |     libpq5 \ | 
			
		
	
	
		
		
			
				
					|  | @ -147,5 +148,5 @@ HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # Configures the startup! |  |  | # Configures the startup! | 
			
		
	
		
		
			
				
					|  |  | WORKDIR / |  |  | WORKDIR / | 
			
		
	
		
		
			
				
					|  |  |  |  |  | ENTRYPOINT ["/usr/bin/dumb-init", "--"] | 
			
		
	
		
		
			
				
					|  |  | CMD ["/start.sh"] |  |  | CMD ["/start.sh"] | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  |  | 
			
		
	
	
		
		
			
				
					|  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -121,6 +121,7 @@ RUN apt-get update && apt-get install -y \ | 
			
		
	
		
		
			
				
					|  |  |     openssl \ |  |  |     openssl \ | 
			
		
	
		
		
			
				
					|  |  |     ca-certificates \ |  |  |     ca-certificates \ | 
			
		
	
		
		
			
				
					|  |  |     curl \ |  |  |     curl \ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |     dumb-init \ | 
			
		
	
		
		
			
				
					|  |  |     sqlite3 \ |  |  |     sqlite3 \ | 
			
		
	
		
		
			
				
					|  |  |     libmariadb-dev-compat \ |  |  |     libmariadb-dev-compat \ | 
			
		
	
		
		
			
				
					|  |  |     libpq5 \ |  |  |     libpq5 \ | 
			
		
	
	
		
		
			
				
					|  | @ -147,5 +148,5 @@ HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # Configures the startup! |  |  | # Configures the startup! | 
			
		
	
		
		
			
				
					|  |  | WORKDIR / |  |  | WORKDIR / | 
			
		
	
		
		
			
				
					|  |  |  |  |  | ENTRYPOINT ["/usr/bin/dumb-init", "--"] | 
			
		
	
		
		
			
				
					|  |  | CMD ["/start.sh"] |  |  | CMD ["/start.sh"] | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  |  | 
			
		
	
	
		
		
			
				
					|  | 
 | 
			
		
	
								
							
						
					 
					
				 
			 
		
			
			
			
			
			
			
				
				
					
						
							
								
									
	
		
		
			
				
					|  | @ -77,9 +77,9 @@ RUN [ "cross-build-start" ] | 
			
		
	
		
		
			
				
					|  |  | RUN apk add --no-cache \ |  |  | RUN apk add --no-cache \ | 
			
		
	
		
		
			
				
					|  |  |         openssl \ |  |  |         openssl \ | 
			
		
	
		
		
			
				
					|  |  |         curl \ |  |  |         curl \ | 
			
		
	
		
		
			
				
					|  |  |  |  |  |         dumb-init \ | 
			
		
	
		
		
			
				
					|  |  |         sqlite \ |  |  |         sqlite \ | 
			
		
	
		
		
			
				
					|  |  |         ca-certificates |  |  |         ca-certificates | 
			
		
	
		
		
			
				
					|  |  | RUN apk add --no-cache -X http://dl-cdn.alpinelinux.org/alpine/edge/community catatonit |  |  |  | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | RUN mkdir /data |  |  | RUN mkdir /data | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
	
		
		
			
				
					|  | @ -102,5 +102,5 @@ HEALTHCHECK --interval=60s --timeout=10s CMD ["/healthcheck.sh"] | 
			
		
	
		
		
			
				
					|  |  | 
 |  |  | 
 | 
			
		
	
		
		
			
				
					|  |  | # Configures the startup! |  |  | # Configures the startup! | 
			
		
	
		
		
			
				
					|  |  | WORKDIR / |  |  | WORKDIR / | 
			
		
	
		
		
			
				
					
					|  |  | CMD ["catatonit", "/start.sh"] |  |  | ENTRYPOINT ["/usr/bin/dumb-init", "--"] | 
			
				
				
			
		
	
		
		
			
				
					
					|  |  | 
 |  |  | CMD ["/start.sh"] | 
			
				
				
			
		
	
		
		
	
		
		
	
	
		
		
			
				
					|  | 
 |