V
V
Vadim2021-08-19 18:34:34
bash
Vadim, 2021-08-19 18:34:34

What does this command mean at the end of the Dockerfile?

at the end of the Dockerfil, the ENTRYPOINT script runs, which says the following:

script.sh
------------------------------------ -------------------------------------------------- -------

sleep infinity & wait $!

well, the first is clear, but why the second part of wait $! ?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry Belyaev, 2021-08-19
@Viji

$! - one of the "magic" bash variables, contains the pid of the last process
wait - I think it's understandable

S
Saboteur, 2021-08-19
@saboteur_kiev

I think this line doesn't make sense. An endless slip in the background, and waiting for the background task to complete.
Together - it is difficult to understand what specific meaning in such a combination.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question