This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <?php | |
| declare(strict_types=1); | |
| namespace ValueObjectTest; | |
| use Sushi\ValueObject; | |
| class PersonValueObject extends ValueObject | |
| { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| FROM debian:sid | |
| RUN echo 'deb http://deb.debian.org/debian stretch main' >> /etc/apt/sources.list \ | |
| && apt-get -y update && apt-get -y install \ | |
| php-parser=1.4.1-2 \ | |
| php7cc | |
| WORKDIR /root |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ ip link | |
| $ ip route | |
| $ sudo ip link add ve0 type veth peer name ve1 | |
| $ sudo ip address add 10.10.10.10/24 dev ve0 | |
| $ sudo ip link set ve0 up | |
| $ sudo ip l s ve1 up |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| $ sudo unshare -p | |
| -bash: fork: Cannot allocate memory | |
| # link to the explanation | |
| $ sudo unshare -p -f | |
| $ ps ax | |
| $ echo $$ |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| hostname | |
| # result: debian | |
| unshare -u | |
| # --- within UTS namespace | |
| hostname | |
| # result: debian |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # localization of test filesystem - please change the ROOTPATH placeholder appropriately | |
| export CONTAINER_FS=ROOTPATH/containers/debian_fs | |
| # UNSHARE | |
| sudo unshare -m chroot $CONTAINER_FS | |
| # --- within chroot | |
| mount -t proc proc /proc | |
| ls /proc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # localization of test filesystem - please change the ROOTPATH placeholder appropriately | |
| export CONTAINER_FS=ROOTPATH/containers/debian_fs | |
| sudo chroot $CONTAINER_FS | |
| # --- within chroot | |
| ps | |
| # above will caused the error: | |
| # Error, do this: mount -t proc proc /proc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # localization of test filesystem - please change the ROOTPATH placeholder appropriately | |
| export CONTAINER_FS=ROOTPATH/containers/debian_fs | |
| # preparing filesystem | |
| mkdir -p $CONTAINER_FS | |
| sudo debootstrap stretch $CONTAINER_FS | |
| # let's mark this filesystem | |
| touch $CONTAINER_FS/CONTAINER_FS |
NewerOlder