github.com/demonoid81/moby@v0.0.0-20200517203328-62dd8e17c460/contrib/mkimage/rinse (about)

     1  #!/usr/bin/env bash
     2  set -e
     3  
     4  rootfsDir="$1"
     5  shift
     6  
     7  # specifying --arch below is safe because "$@" can override it and the "latest" one wins :)
     8  
     9  (
    10  	set -x
    11  	rinse --directory "$rootfsDir" --arch amd64 "$@"
    12  )
    13  
    14  "$(dirname "$BASH_SOURCE")/.febootstrap-minimize" "$rootfsDir"
    15  
    16  if [ -d "$rootfsDir/etc/sysconfig" ]; then
    17  	# allow networking init scripts inside the container to work without extra steps
    18  	echo 'NETWORKING=yes' > "$rootfsDir/etc/sysconfig/network"
    19  fi
    20  
    21  # make sure we're fully up-to-date, too
    22  (
    23  	set -x
    24  	chroot "$rootfsDir" yum update -y
    25  )