mirror of
https://github.com/linuxkit/linuxkit.git
synced 2025-07-20 17:49:10 +00:00
Merge pull request #1345 from justincormack/fix-mtab
Fix accidental removal of /etc/mtab from images
This commit is contained in:
commit
86c59d8588
@ -50,7 +50,7 @@ type MobyImage struct {
|
||||
ReadOnly bool `yaml:"read_only"`
|
||||
}
|
||||
|
||||
const riddler = "mobylinux/riddler:8fe62ff02b9d28767554105b55d4613db3e77429@sha256:42b7f5c81fb85f8afb17548e00e5b81cfa4818c192e1199d61850491a178b0da"
|
||||
const riddler = "mobylinux/riddler:c23ab4b6e2a2a4ebd4dd51a059cef7f270da72cb@sha256:7e7744b2f554518411633200db98e599782b120e323348495f43f540de26f7b6"
|
||||
|
||||
// NewConfig parses a config file
|
||||
func NewConfig(config []byte) (*Moby, error) {
|
||||
|
@ -52,7 +52,7 @@ rm config.json.orig
|
||||
# extract rootfs
|
||||
EXCLUDE="--exclude .dockerenv --exclude Dockerfile \
|
||||
--exclude dev/console --exclude dev/pts --exclude dev/shm \
|
||||
--exclude etc/hostname --exclude etc/hosts --exclude etc/mtab --exclude etc/resolv.conf"
|
||||
--exclude etc/hostname --exclude etc/hosts --exclude etc/resolv.conf"
|
||||
mkdir -p rootfs
|
||||
CONTAINER="$(docker create $IMAGE /dev/null)"
|
||||
docker export "$CONTAINER" | tar -xf - -C rootfs $EXCLUDE
|
||||
|
Loading…
Reference in New Issue
Block a user