mirror of
				https://github.com/dockersrc/ubuntu
				synced 2025-11-04 07:02:10 -05:00 
			
		
		
		
	🗃️ Committing everything that changed 🗃️
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				ubuntu-19-04 / ubuntu-19-04 (push) Failing after 3m39s
				
			
		
			
				
	
				ubuntu-20-04 / ubuntu-20-04 (push) Failing after 3m21s
				
			
		
			
				
	
				ubuntu-21-04 / ubuntu-21-04 (push) Failing after 4m54s
				
			
		
			
				
	
				ubuntu-23-04 / ubuntu-23-04 (push) Failing after 4m26s
				
			
		
			
				
	
				ubuntu-23-10 / ubuntu-23-10 (push) Failing after 6m58s
				
			
		
			
				
	
				ubuntu-22-04 / ubuntu-22-04 (push) Successful in 2h49m38s
				
			
		
			
				
	
				ubuntu-24-04 / ubuntu-24-04 (push) Failing after 3h1m49s
				
			
		
			
				
	
				ubuntu-24-10 / ubuntu-24-10 (push) Failing after 3h11m39s
				
			
		
			
				
	
				ubuntu-latest / ubuntu-latest (push) Failing after 3h12m40s
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	ubuntu-19-04 / ubuntu-19-04 (push) Failing after 3m39s
				
			ubuntu-20-04 / ubuntu-20-04 (push) Failing after 3m21s
				
			ubuntu-21-04 / ubuntu-21-04 (push) Failing after 4m54s
				
			ubuntu-23-04 / ubuntu-23-04 (push) Failing after 4m26s
				
			ubuntu-23-10 / ubuntu-23-10 (push) Failing after 6m58s
				
			ubuntu-22-04 / ubuntu-22-04 (push) Successful in 2h49m38s
				
			ubuntu-24-04 / ubuntu-24-04 (push) Failing after 3h1m49s
				
			ubuntu-24-10 / ubuntu-24-10 (push) Failing after 3h11m39s
				
			ubuntu-latest / ubuntu-latest (push) Failing after 3h12m40s
				
			rootfs/usr/local/etc/docker/functions/entrypoint.sh
This commit is contained in:
		@@ -124,9 +124,13 @@ __init_working_dir() {
 | 
				
			|||||||
}
 | 
					}
 | 
				
			||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
					# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
				
			||||||
__exec_service() {
 | 
					__exec_service() {
 | 
				
			||||||
 | 
					  local count=6
 | 
				
			||||||
  echo "Starting $1"
 | 
					  echo "Starting $1"
 | 
				
			||||||
  eval "$@" 2>>/dev/stderr &
 | 
					  eval "$@" 2>>/dev/stderr >>/data/logs/start.log &
 | 
				
			||||||
  [ $? -eq 0 ] && touch "/run/init.d/$1.pid" || return 1
 | 
					  while [ $count -ne 0 ]; do
 | 
				
			||||||
 | 
					    sleep 10
 | 
				
			||||||
 | 
					    __pgrep $1 && touch "/run/init.d/$1.pid" && break || count=$((count - 1))
 | 
				
			||||||
 | 
					  done
 | 
				
			||||||
}
 | 
					}
 | 
				
			||||||
# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
					# - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
 | 
				
			||||||
__update_ssl_certs() {
 | 
					__update_ssl_certs() {
 | 
				
			||||||
@@ -418,7 +422,7 @@ __file_copy() {
 | 
				
			|||||||
__generate_random_uids() {
 | 
					__generate_random_uids() {
 | 
				
			||||||
  local set_random_uid="$(seq 3000 5000 | sort -R | head -n 1)"
 | 
					  local set_random_uid="$(seq 3000 5000 | sort -R | head -n 1)"
 | 
				
			||||||
  while :; do
 | 
					  while :; do
 | 
				
			||||||
    if grep -qs "x:.*:$set_random_uid:" "/etc/group" && ! grep -shq "x:$set_random_uid:.*:" "/etc/passwd"; then
 | 
					    if grep -shq "x:.*:$set_random_uid:" "/etc/group" && ! grep -shq "x:$set_random_uid:.*:" "/etc/passwd"; then
 | 
				
			||||||
      set_random_uid=$((set_random_uid + 1))
 | 
					      set_random_uid=$((set_random_uid + 1))
 | 
				
			||||||
    else
 | 
					    else
 | 
				
			||||||
      echo "$set_random_uid"
 | 
					      echo "$set_random_uid"
 | 
				
			||||||
@@ -538,7 +542,7 @@ __create_service_user() {
 | 
				
			|||||||
  local create_gid="${5:-${SERVICE_GID:-$USER_GID}}"
 | 
					  local create_gid="${5:-${SERVICE_GID:-$USER_GID}}"
 | 
				
			||||||
  local random_id="$(__generate_random_uids)"
 | 
					  local random_id="$(__generate_random_uids)"
 | 
				
			||||||
  local create_home_dir="${create_home_dir:-/home/$create_user}"
 | 
					  local create_home_dir="${create_home_dir:-/home/$create_user}"
 | 
				
			||||||
  grep -shq "^$create_user:" "/etc/passwd" && grep -sh "^$create_group:" "/etc/group" && return
 | 
					  grep -shq "^$create_user:" "/etc/passwd" && grep -shq "^$create_group:" "/etc/group" && return
 | 
				
			||||||
  [ "$create_user" = "root" ] && [ "$create_group" = "root" ] && return 0
 | 
					  [ "$create_user" = "root" ] && [ "$create_group" = "root" ] && return 0
 | 
				
			||||||
  if [ "$RUNAS_USER" != "root" ] && [ "$RUNAS_USER" != "" ]; then
 | 
					  if [ "$RUNAS_USER" != "root" ] && [ "$RUNAS_USER" != "" ]; then
 | 
				
			||||||
    create_user="$RUNAS_USER"
 | 
					    create_user="$RUNAS_USER"
 | 
				
			||||||
@@ -566,8 +570,8 @@ __create_service_user() {
 | 
				
			|||||||
    echo "creating system user $create_user"
 | 
					    echo "creating system user $create_user"
 | 
				
			||||||
    useradd --system -u $create_uid -g $create_group -c "Account for $create_user" -d "$create_home_dir" -s /bin/false $create_user 2>/dev/stderr | tee -p -a "/data/logs/init.txt" >/dev/null
 | 
					    useradd --system -u $create_uid -g $create_group -c "Account for $create_user" -d "$create_home_dir" -s /bin/false $create_user 2>/dev/stderr | tee -p -a "/data/logs/init.txt" >/dev/null
 | 
				
			||||||
  fi
 | 
					  fi
 | 
				
			||||||
  grep -qs "$create_group" "/etc/group" || exitStatus=$((exitCode + 1))
 | 
					  grep -shq "$create_group" "/etc/group" || exitStatus=$((exitCode + 1))
 | 
				
			||||||
  grep -qs "$create_user" "/etc/passwd" || exitStatus=$((exitCode + 1))
 | 
					  grep -shq "$create_user" "/etc/passwd" || exitStatus=$((exitCode + 1))
 | 
				
			||||||
  if [ $exitStatus -eq 0 ]; then
 | 
					  if [ $exitStatus -eq 0 ]; then
 | 
				
			||||||
    export WORK_DIR="${create_home_dir:-}"
 | 
					    export WORK_DIR="${create_home_dir:-}"
 | 
				
			||||||
    if [ -n "$WORK_DIR" ]; then
 | 
					    if [ -n "$WORK_DIR" ]; then
 | 
				
			||||||
 
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user