timedatectl
1 | timedatectl list-timezones |
1 | # On the Host |
默认的权限规则是,root用户被映射成nfsnobody用户,对于客户端机器上和NFS服务器上UID相同的用户会对应映射,其它非root用户被映射成nobody用户。当root用户访问共享目录时是以nfsnobody用户访问共享目录的,具有什么权限看下共享目录权限便知。客户端机器上和NFS服务器上的相同UID用户,以NFS服务器上的用户访问共享目录,看戏目录权限便知。其它非root用户则映射成nobody用户,有啥权限一看便知。
配置文件: /etc/exports
/mount/www 192.168.x.x/24(rw,all_squash,anonuid=500,anongid=500)
WinRM 打开: Enable-PSRemoting -force
1 | ##交互 |
1 | Start-Job -ScriptBlock {...} |
1 | netsh |
Docker has a default entrypoint which is /bin/sh -c but does not have a default command.
When you run docker like this: docker run -i -t ubuntu bash the entrypoint is the default /bin/sh -c, the image is ubuntu and the command is bash.
The command is run via the entrypoint. i.e., the actual thing that gets executed is /bin/sh -c bash. This allowed Docker to implement RUN quickly by relying on the shell’s parser.
Later on, people asked to be able to customize this, so ENTRYPOINT and –entrypoint were introduced.
Everything after ubuntu in the example above is the command and is passed to the entrypoint. When using the CMD instruction, it is exactly as if you were doing docker run -i -t ubuntu
You will also get the same result if you instead type this command docker run -i -t ubuntu. You will still start a bash shell in the container because of the ubuntu Dockerfile specified a default CMD: CMD [“bash”]
As everything is passed to the entrypoint, you can have a very nice behavior from your images. @Jiri example is good, it shows how to use an image as a “binary”. When using [“/bin/cat”] as entrypoint and then doing docker run img /etc/passwd, you get it, /etc/passwd is the command and is passed to the entrypoint so the end result execution is simply /bin/cat /etc/passwd.
Another example would be to have any cli as entrypoint. For instance, if you have a redis image, instead of running docker run redisimg redis -H something -u toto get key, you can simply have ENTRYPOINT [“redis”, “-H”, “something”, “-u”, “toto”] and then run like this for the same result: docker run redisimg get key.