anchor.diff:      os:cmd("cp -R " ++ ImageDir ++ " " ++ Rootfs).
   
   mount_image_overlay(ImageDir, ContainerDir, Rootfs) ->
  -        Overlay = ContainerDir ++ "/overlay/",
  -        WorkDir = ContainerDir ++ "/overlay.work/",
  -        lists:foreach(fun(X) -> filelib:ensure_dir(X) end,[Rootfs, Overlay, WorkDir]),
  -        FsOptions = "lowerdir=" ++ ImageDir ++",upperdir="++ Overlay++ ",workdir=" ++ WorkDir,
  -        mount("none", Rootfs, "overlay", linux:ms_mgc_val(), FsOptions).
  +    Overlay = ContainerDir ++ "/overlay/",
  +    WorkDir = ContainerDir ++ "/overlay.work/",
  +    lists:foreach(fun(X) -> filelib:ensure_dir(X) end,[Rootfs, Overlay, WorkDir]),
  +    FsOptions = "lowerdir=" ++ ImageDir ++",upperdir="++ Overlay++ ",workdir=" ++ WorkDir,
  +    mount("none", Rootfs, "overlay", linux:ms_mgc_val(), FsOptions).
   
   
   mount(Source, Target, Fs, Flags, Options) ->
       posix:mount_libc(Source, Target, Fs, Flags, Options).
   
   unshare(Flags) ->
  -    posix:unshare_libc(Flags).
  +    posix:syscall_libc(linux:sys_unshare(), Flags).
   
   %% Equivalent of ->  mount --make-rprivate /
   %% Prevent mounts in the container from leaking to the parent
  
positive.code:     lager:info("UserId : ~p  & GroupId: ~p", [UserId, GroupId]),
      ResMountPropogation = set_mount_propogation(),
      lager:info("set_mount_propogation result: ~p", [ResMountPropogation]),
      ResUnshare= unshare(linux:clone_newpid() bor linux:clone_newnet() bor 
                              linux:clone_newns() bor linux:clone_newuts() bor linux:clone_newcgroup() bor 
                              linux:clone_newipc() bor linux:clone_newuser()),
      lager:info("unshare syscall result: ~p", [ResUnshare]),
      setgroups_write(undefined),
      map_user(0, UserId, 1, undefined),
  
negative.code:         IsFile -> file:delete(NewDevice);
          true -> lager:debug("New device is not a file")
      end,
      mount(HostDevice, NewDevice, "bind", linux:ms_bind(), ?NULL).
  
  symlink_many(Mapping) ->
      maps:fold(
        fun(K, V, ok) ->
                R = K ++ " " ++ V,
                os:cmd("ln -sf " ++ R)
        end, ok, Mapping).
  
  setup_fs(Rootfs) ->
      lager:info("pivoting root: ~p", [Rootfs]),
      OldRoot = pivot_root(Rootfs),
  
      %% need to mount a /proc filesystem in the namespace, if not the tools like ps and top will read
  