golang.org/x/build@v0.0.0-20240506185731-218518f32b70/env/linux-ppc64/osuosl/sid-image/build-sid.sh (about) 1 #!/bin/sh -ex 2 # Copyright 2022 The Go Authors. All rights reserved. 3 # Use of this source code is governed by a BSD-style 4 # license that can be found in the LICENSE file. 5 6 export rootfs=$(pwd)/debian_sid 7 if [ ! -e "$rootfs" ]; then 8 ( 9 sudo -E sh -c 'debootstrap --variant=minbase --keyring=/usr/share/keyrings/debian-ports-archive-keyring.gpg --include debian-ports-archive-keyring sid $rootfs https://deb.debian.org/debian-ports' 10 cd "$rootfs" 11 sudo rm -rf var/log/{dpkg,bootstrap,alternatives}.log var/cache/ldconfig/aux-cache var/cache/apt/* var/lib/apt/lists/* dev/* proc/* sys/* 12 ) 13 else 14 echo "skipping debootstrap" 15 fi 16 17 cat > Dockerfile.sid <<'EOF' 18 FROM scratch 19 COPY ./debian_sid/ / 20 CMD ["/bin/bash"] 21 EOF 22 23 # always build with buildkit :) 24 export DOCKER_BUILDKIT=1 25 sudo -E docker build -f Dockerfile.sid -t murp/debian:sid-ppc64 . 26 sudo docker run -it --rm murp/debian:sid-ppc64 cat /etc/os-release