File tree Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Expand file tree Collapse file tree 2 files changed +7
-7
lines changed Original file line number Diff line number Diff line change 2
2
3
3
set -xe
4
4
5
- dd if=/dev/zero of=rootfs.ext4 bs=1M count=200
5
+ dd if=/dev/zero of=rootfs.ext4 bs=1M count=1000
6
6
mkfs.ext4 rootfs.ext4
7
7
mkdir -p /tmp/my-rootfs
8
8
mount rootfs.ext4 /tmp/my-rootfs
@@ -11,7 +11,7 @@ docker run -i --rm \
11
11
-v /tmp/my-rootfs:/my-rootfs \
12
12
-v " $( pwd) /target/x86_64-unknown-linux-musl/release/agent:/usr/local/bin/agent" \
13
13
-v " $( pwd) /openrc-service.sh:/etc/init.d/agent" \
14
- alpine sh < setup-alpine.sh
14
+ alpine sh < setup-alpine.sh
15
15
16
16
umount /tmp/my-rootfs
17
17
Original file line number Diff line number Diff line change @@ -6,21 +6,21 @@ apk add --no-cache openrc
6
6
apk add --no-cache util-linux
7
7
apk add --no-cache gcc libc-dev
8
8
apk add --no-cache python2 python3
9
- apk add --no-cache golang
9
+ apk add --no-cache go
10
10
11
11
ln -s agetty /etc/init.d/agetty.ttyS0
12
- echo ttyS0 > /etc/securetty
12
+ echo ttyS0 > /etc/securetty
13
13
rc-update add agetty.ttyS0 default
14
14
15
- echo " root:root" | chpasswd
15
+ echo " root:root" | chpasswd
16
16
17
- echo " nameserver 1.1.1.1" >> /etc/resolv.conf
17
+ echo " nameserver 1.1.1.1" >> /etc/resolv.conf
18
18
19
19
rc-update add devfs boot
20
20
rc-update add procfs boot
21
21
rc-update add sysfs boot
22
22
23
23
rc-update add agent boot
24
24
25
- for d in bin etc lib root sbin usr; do tar c " /$d " | tar x -C /my-rootfs; done
25
+ for d in bin etc lib root sbin usr; do tar c " /$d " | tar x -C /my-rootfs; done
26
26
for dir in dev proc run sys var tmp; do mkdir /my-rootfs/${dir} ; done
You can’t perform that action at this time.
0 commit comments