mirror of
https://github.com/moby/moby.git
synced 2022-11-09 12:21:53 -05:00
Merge pull request #2363 from tianon/mkimage-numeric-owner
Update all the mkimage scripts to use --numeric-owner as a tar argument
This commit is contained in:
commit
aa6c99aff6
4 changed files with 5 additions and 5 deletions
|
@ -62,6 +62,6 @@ mknod -m 666 ${DEV}/full c 1 7
|
||||||
mknod -m 600 ${DEV}/initctl p
|
mknod -m 600 ${DEV}/initctl p
|
||||||
mknod -m 666 ${DEV}/ptmx c 5 2
|
mknod -m 666 ${DEV}/ptmx c 5 2
|
||||||
|
|
||||||
tar -C $ROOTFS -c . | docker import - archlinux
|
tar --numeric-owner -C $ROOTFS -c . | docker import - archlinux
|
||||||
docker run -i -t archlinux echo Success.
|
docker run -i -t archlinux echo Success.
|
||||||
rm -rf $ROOTFS
|
rm -rf $ROOTFS
|
||||||
|
|
|
@ -35,5 +35,5 @@ do
|
||||||
cp -a /dev/$X dev
|
cp -a /dev/$X dev
|
||||||
done
|
done
|
||||||
|
|
||||||
tar -cf- . | docker import - busybox
|
tar --numeric-owner -cf- . | docker import - busybox
|
||||||
docker run -i -u root busybox /bin/echo Success.
|
docker run -i -u root busybox /bin/echo Success.
|
||||||
|
|
|
@ -189,10 +189,10 @@ if [ "$justTar" ]; then
|
||||||
touch "$repo"
|
touch "$repo"
|
||||||
|
|
||||||
# fill the tarball
|
# fill the tarball
|
||||||
sudo tar -caf "$repo" .
|
sudo tar --numeric-owner -caf "$repo" .
|
||||||
else
|
else
|
||||||
# create the image (and tag $repo:$suite)
|
# create the image (and tag $repo:$suite)
|
||||||
sudo tar -c . | $docker import - $repo $suite
|
sudo tar --numeric-owner -c . | $docker import - $repo $suite
|
||||||
|
|
||||||
# test the image
|
# test the image
|
||||||
$docker run -i -t $repo:$suite echo success
|
$docker run -i -t $repo:$suite echo success
|
||||||
|
|
|
@ -44,6 +44,6 @@ do
|
||||||
done
|
done
|
||||||
|
|
||||||
chmod 0755 $ROOTFS # See #486
|
chmod 0755 $ROOTFS # See #486
|
||||||
tar -cf- . | docker import - docker-ut
|
tar --numeric-owner -cf- . | docker import - docker-ut
|
||||||
docker run -i -u root docker-ut /bin/echo Success.
|
docker run -i -u root docker-ut /bin/echo Success.
|
||||||
rm -rf $ROOTFS
|
rm -rf $ROOTFS
|
||||||
|
|
Loading…
Add table
Reference in a new issue