docker: Warn about broken host setup based on aufs
There is a nasty problem with legacy aufs: wic tries to find out the block size of the filesystem that holds the partition images, but aufs does not seem to implement this properly, returning 0 at least on Debian Jessie. That makes wic become upset and through a division-by-zero exception soon after. Catch this case by warning the user about the inappropriate docker setup during container start. Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
This commit is contained in:
		
				
					committed by
					
						
						Daniel Wagner
					
				
			
			
				
	
			
			
			
						parent
						
							8e3862112c
						
					
				
				
					commit
					7f1ccba5ea
				
			@@ -1,5 +1,16 @@
 | 
				
			|||||||
#!/bin/bash
 | 
					#!/bin/bash
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					if mount | grep -q "on / type aufs"; then
 | 
				
			||||||
 | 
					    cat <<EOF >&2
 | 
				
			||||||
 | 
					WARNING: Generation of wic images will fail!
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					Your docker host setup uses broken aufs as storage driver. Adjust the docker
 | 
				
			||||||
 | 
					configuration to use a driver (overlay, overlay2, devicemapper). You may also
 | 
				
			||||||
 | 
					need to update the host distribution (e.g. Debian Jessie -> Stretch).
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					EOF
 | 
				
			||||||
 | 
					fi
 | 
				
			||||||
 | 
					
 | 
				
			||||||
USER_ID=${USER_ID:-30000}
 | 
					USER_ID=${USER_ID:-30000}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
# Create a non-root user that will perform the actual build
 | 
					# Create a non-root user that will perform the actual build
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user