読者です 読者をやめる 読者になる 読者になる

AKAI TSUKI

System development or Technical something

try docker run

I use ls in docker container.

$ docker@default:~/work$ docker images
REPOSITORY          TAG                 IMAGE ID            CREATED             SIZE
centos              latest              778a53015523        3 weeks ago         196.7 MB
$ docker run -it -d -v /c/Users/user_name/work_dir:/home/work --name sample centos bash
$ docker exec -it sample bash
[root@d52ae6410ee4 /]# ls
anaconda-post.log  bin  dev  etc  home  lib  lib64  lost+found  media  mnt  opt  proc  root  run  sbin  srv  sys  tmp  usr  var
[root@d52ae6410ee4 /]#