Запуск процесса в systemd init для контейнеризации?

Что касается Bash, .и sourceне являются псевдонимами для одного или другого, это простой факт, что они оба являются встроенными функциями, которые вызывают одну и ту же базовую функцию, source_builtin.

Взгляните на файл source.defиз исходного кода Bash:

$PRODUCES source.c

$BUILTIN source
$FUNCTION source_builtin
$SHORT_DOC source filename [arguments]
Execute commands from a file in the current shell.

Read and execute commands from FILENAME in the current shell.  The
entries in $PATH are used to find the directory containing FILENAME.
If any ARGUMENTS are supplied, they become the positional parameters
when FILENAME is executed.

Exit Status:
Returns the status of the last command executed in FILENAME; fails if
FILENAME cannot be read.
$END

$BUILTIN.
$DOCNAME dot
$FUNCTION source_builtin
$SHORT_DOC. filename [arguments]
Execute commands from a file in the current shell.

Read and execute commands from FILENAME in the current shell.  The
entries in $PATH are used to find the directory containing FILENAME.
If any ARGUMENTS are supplied, they become the positional parameters
when FILENAME is executed.

Exit Status:
Returns the status of the last command executed in FILENAME; fails if
FILENAME cannot be read.
$END

Ссылки

0
29.11.2020, 17:56
1 ответ

Вы используете CMDдля настройки контейнера для запуска systemd, поэтому мне кажется, что это «полезно».

Чтобы запустить другую команду в вашем контейнере, либо:

  • в командной строке используйте docker exec;
  • В определении контейнера используйте службу systemd.
0
18.03.2021, 23:17

Теги

Похожие вопросы