如何使Docker以root身份运行?

时间:2018-12-18 05:51:26

标签: docker root

我创建了一个Docker env来运行,现在运行时

   $HOME/.ctags.d/*.ctags

   $HOMEDRIVE$HOMEPATH/ctags.d/*.ctags (on MSWindows only)

   .ctags.d/*.ctags

   ctags.d/*.ctags
      If any of these configuration files exist, each will be expected to contain a set of default options which are read in the order listed when ctags starts, but before the CTAGS
      environment variable is read or any command line options are read. This makes it possible to set up personal or project-level defaults. It is possible to compile ctags to read
      an  additional  configuration  file  before  any  of those shown above, which will be indicated if the output produced by the --version option lists the "custom-conf" feature.
      Options appearing in the CTAGS environment variable or on the command line will override options specified in these files. Only options will be read  from  these  files.  Note
      that  the  option files are read in line-oriented mode in which spaces are significant (since shell quoting is not possible) but spaces at the beginning of a line are ignored.
      Each line of the file is read as one command line parameter (as if it were quoted with single quotes).  Therefore, use new lines to indicate separate  command-line  arguments.
      A line starting with '#' is treated as a comment.

      *.ctags files in a directory are loaded in alphabetical order.

   tags   The default tag file created by ctags.

   TAGS   The default tag file created by etags.

开始于

select o.*, prev.*
from Orders o
cross apply
 (
   select top 1 *
   from Orders P where P.OrderDate < O.OrderDate
   order by OrderDate DESC
 ) prev

这需要对其系统进行管理访问,那么如何使Docker以root身份运行?

1 个答案:

答案 0 :(得分:0)

sudo docker run <name> <arguments>

或者,如果ypu不使用sudo将docker添加到用户组,则像这样smtng:

sudo groupadd docker

然后sudo gpasswd -a $USER docker,之后您应该注销/登录。

或者,也许更简单,但是我没有使用它:

sudo usermod -aG docker $USER