Skip to content

Commit

Permalink
Enable swap on builder
Browse files Browse the repository at this point in the history
  • Loading branch information
apmorton committed Jul 8, 2020
1 parent 90f1fc1 commit 862024c
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions setup-builder-startup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,19 +9,22 @@ DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
systemctl stop docker
umount /ephemeral || true
sfdisk -f /dev/nvme0n1 <<EOF
label: dos
label-id: 0xbebcaa2e
device: /dev/nvme0n1
unit: sectors
/dev/nvme0n1p1 : start= 2048, size= 781247952, type=83
label: dos │
label-id: 0x7d7e658b │
device: /dev/nvme0n1 │
unit: sectors │
/dev/nvme0n1p1 : start= 3999744, size= 120999936, type=82 │
/dev/nvme0n1p2 : start= 124999680, size= 656248832, type=83
EOF
sync
sleep 2 # let the device get registered
mkfs.ext4 -F /dev/nvme0n1p1
mkswap /dev/nvme0n1p1
swapon /dev/nvme0n1p1
mkfs.ext4 -F /dev/nvme0n1p2
rm -rf /ephemeral
mkdir /ephemeral
mount /dev/nvme0n1p1 /ephemeral
mount /dev/nvme0n1p2 /ephemeral

cat >/etc/docker/daemon.json <<EOF
{
Expand Down

0 comments on commit 862024c

Please sign in to comment.