docker pull vimagick/privoxy
Using default tag: latest
latest: Pulling from vimagick/privoxy
8e3ba11ec2a2: Extracting
[==================================================>]
2.207MB/2.207MB
36c2a994d09d: Download complete
821b025e6874: Download complete
failed to register layer: Error processing tar file(exit
status 1): invalid argument
перед chroot монтируются следующие каталоги:
ChrootDir=$1;
if [ -z $ChrootDir ]; then
{
echo 'Please specify a non null $ChrootDir';
exit 1;
}
fi;
bind_dir()
{
DirName=$1;
MountPoint=$ChrootDir""$DirName;
umount $MountPoint; >> /dev/null;
mkdir -p $MountPoint;
mount --bind $DirName $MountPoint;
}
bind_file()
{
FileName=$1;
MountPoint=$ChrootDir""$FileName;
umount $MountPoint; >> /dev/null;
mount --bind $FileName $MountPoint;
}
bind_system()
{
mkdir -p $ChrootDir/sys $ChrootDir/proc $ChrootDir/dev $ChrootDir/usr/src $ChrootDir/lib/modules $ChrootDir/utils $ChrootDir/download $ChrootDir/home $ChrootDir/var/run2;
bind_dir /sys;
bind_dir /proc;
bind_dir /dev;
bind_dir /dev/pts;
bind_dir /usr/src;
bind_dir /lib/modules;
bind_dir /utils;
bind_dir /download;
bind_dir /home;
bind_dir /var/run2/mysqld;
bind_dir /data_root;
# bind_dir /data_root/data/versions;
# bind_dir /data_root/data/domains;
# bind_file /etc/passwd;
# bind_file /etc/group;
# bind_file /etc/shadow;
bind_file /etc/hosts;
bind_file /etc/hostname;
bind_file /etc/localtime;
bind_file /etc/timezone;
bind_file /etc/resolv.conf;
# bind_file /root/.Xauthority;
}
bind_system;