Skip to content

Instantly share code, notes, and snippets.

@LnL7
Created April 25, 2020 19:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save LnL7/e4a0d7cc2a90cdbb2d2ef2c36ab52b1f to your computer and use it in GitHub Desktop.
Save LnL7/e4a0d7cc2a90cdbb2d2ef2c36ab52b1f to your computer and use it in GitHub Desktop.
$ sudo cntr attach -t command cntr-/nix/store/gcqpj041jll6qgq3cbkp73rbx1vjh96d-foo
$ cd /var/lib/cntr
% ls
bin build dev etc nix proc run tmp var
% ls build
env-vars
$ cntr exec bash
bash-4.4$ pwd
/
bash-4.4$ cd /build
bash-4.4$ ls -la
total 17
drwx------ 2 nixbld nixbld 80 Apr 25 18:58 .
drwxr-x--- 11 nobody nixbld 11 Apr 25 18:59 ..
-rw-r--r-- 1 nixbld nixbld 5 Apr 25 18:58 .attr-0
-rw-r--r-- 1 nixbld nixbld 3690 Apr 25 18:58 env-vars
bash-4.4$ exit
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment