Closed iapaddler closed 1 year ago
Here is the overview of the model presented in the example:
stateDiagram-v2
Host: Host
DindContainer: Docker in docker container
EdgeContainer: Edge container
OtherContainer: Ubuntu container
state Host {
DindContainer
}
state DindContainer {
EdgeContainer
OtherContainer
}
Notes:
Docker in docker container
layer we do not have cron.d running
Partially handled by 4e0e249Edge container -> Docker in docker container
Docker in docker container -> Host
We need a file descriptor that allows us to switch the mount namespace to the parent. Handled by proper command line described in https://github.com/criblio/appscope/issues/1197#issuecomment-1315411724
The way of identification of container PID is changed in #1195
Following command allows us to run scope start in the context of the host:
docker pull docker:dind
docker run -it -p 9420:9420 --hostname dind --name dind --privileged -d --rm -v /:/hostfs:ro docker:dind
docker exec -it dind /bin/sh
docker pull cribl/cribl:next-nightly
docker pull ubuntu:18.04
docker run --privileged -d -e CRIBL_EDGE=1 -p 9420:9420 -v /var/run/appscope:/var/run/appscope -v /var/run/docker.sock:/var/run/docker.sock -v /hostfs:/hostfs:ro --restart unless-stopped --name cribl-edge cribl/cribl:next-nightly
docker run -d -v /var/run/appscope/:/var/run/appscope/ --privileged --rm ubuntu:18.04 tail -f /dev/null
We need to propagate procfs from host to Edge via, two: mount points
-v /:/hostfs:ro
-v /hostfs:ro:/hostfs:ro
stept to repro: