mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-19 17:26:28 +00:00
Merge pull request #1298 from riyazdf/readonly-rootfs
Remount rootfs as read-only after init, /var and /containers mounted as rw
This commit is contained in:
commit
dbb67e969b
@ -1,7 +1,7 @@
|
||||
kernel:
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||
init: "mobylinux/init:c0007f0cdf1ef821a981fcc676e3f1c2dd9ab5b1"
|
||||
init: "mobylinux/init:0b2b3811f6397c4367a4480a53837d41a8d7b3a9"
|
||||
system:
|
||||
- name: sysctl
|
||||
image: "mobylinux/sysctl:2cf2f9d5b4d314ba1bfc22b2fe931924af666d8c"
|
||||
|
@ -1,7 +1,7 @@
|
||||
kernel:
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init: "mobylinux/init:c0007f0cdf1ef821a981fcc676e3f1c2dd9ab5b1"
|
||||
init: "mobylinux/init:0b2b3811f6397c4367a4480a53837d41a8d7b3a9"
|
||||
system:
|
||||
- name: sysctl
|
||||
image: "mobylinux/sysctl:2cf2f9d5b4d314ba1bfc22b2fe931924af666d8c"
|
||||
|
@ -1,7 +1,7 @@
|
||||
kernel:
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init: "mobylinux/init:c0007f0cdf1ef821a981fcc676e3f1c2dd9ab5b1"
|
||||
init: "mobylinux/init:0b2b3811f6397c4367a4480a53837d41a8d7b3a9"
|
||||
system:
|
||||
- name: sysctl
|
||||
image: "mobylinux/sysctl:2cf2f9d5b4d314ba1bfc22b2fe931924af666d8c"
|
||||
|
@ -1,7 +1,7 @@
|
||||
kernel:
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=tty0 page_poison=1"
|
||||
init: "mobylinux/init:c0007f0cdf1ef821a981fcc676e3f1c2dd9ab5b1"
|
||||
init: "mobylinux/init:0b2b3811f6397c4367a4480a53837d41a8d7b3a9"
|
||||
system:
|
||||
- name: sysctl
|
||||
image: "mobylinux/sysctl:2cf2f9d5b4d314ba1bfc22b2fe931924af666d8c"
|
||||
|
2
moby.yml
2
moby.yml
@ -1,7 +1,7 @@
|
||||
kernel:
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 console=tty0 page_poison=1"
|
||||
init: "mobylinux/init:c0007f0cdf1ef821a981fcc676e3f1c2dd9ab5b1"
|
||||
init: "mobylinux/init:0b2b3811f6397c4367a4480a53837d41a8d7b3a9"
|
||||
system:
|
||||
- name: sysctl
|
||||
image: "mobylinux/sysctl:2cf2f9d5b4d314ba1bfc22b2fe931924af666d8c"
|
||||
|
@ -105,4 +105,13 @@ ip link set lo up
|
||||
# for containerising dhcpcd and other containers that need writable etc
|
||||
mkdir /tmp/etc
|
||||
mv /etc/resolv.conf /tmp/etc/resolv.conf
|
||||
ln -snf /tmp/etc/resolv.conf /etc/resolv.conf
|
||||
ln -snf /tmp/etc/resolv.conf /etc/resolv.conf
|
||||
|
||||
# remount rootfs as readonly
|
||||
mount -o remount,ro /
|
||||
|
||||
# bind and remount containers and var as read-write
|
||||
mount -o bind /containers /containers
|
||||
mount -o bind /var /var
|
||||
mount -o remount,rw,relatime /containers /containers
|
||||
mount -o remount,rw,nodev,nosuid,relatime /var /var
|
||||
|
@ -1,7 +1,7 @@
|
||||
kernel:
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init: "mobylinux/init:c0007f0cdf1ef821a981fcc676e3f1c2dd9ab5b1"
|
||||
init: "mobylinux/init:0b2b3811f6397c4367a4480a53837d41a8d7b3a9"
|
||||
system:
|
||||
- name: ltp
|
||||
image: "mobylinux/test-ltp-20170116:fdca2d1bb019b1d51e722e6032c82c7933d4b870"
|
||||
|
@ -1,7 +1,7 @@
|
||||
kernel:
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0"
|
||||
init: "mobylinux/init:c0007f0cdf1ef821a981fcc676e3f1c2dd9ab5b1"
|
||||
init: "mobylinux/init:0b2b3811f6397c4367a4480a53837d41a8d7b3a9"
|
||||
system:
|
||||
- name: binfmt
|
||||
image: "mobylinux/binfmt:bdb754f25a5d851b4f5f8d185a43dfcbb3c22d01"
|
||||
|
@ -5,7 +5,7 @@ kernel:
|
||||
# image: "mobylinux/kernel:4.9.14-0"
|
||||
image: "mobylinux/kernel:4.9.x"
|
||||
cmdline: "console=ttyS0 page_poison=1"
|
||||
init: "mobylinux/init:c0007f0cdf1ef821a981fcc676e3f1c2dd9ab5b1"
|
||||
init: "mobylinux/init:0b2b3811f6397c4367a4480a53837d41a8d7b3a9"
|
||||
system:
|
||||
- name: sysctl
|
||||
image: "mobylinux/sysctl:2cf2f9d5b4d314ba1bfc22b2fe931924af666d8c"
|
||||
|
Loading…
Reference in New Issue
Block a user