Re: Connect /usr/bin/init to docker container's STDOUT/STDIN

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

On Thu, Sep 29, 2022 at 07:42:45PM +0200, Nicola Mori wrote:
> Hi,
> 3) Gitlab CI needs a shell running inside the container and attached to the
> container's STDIN/STDOUT

maybe it helps, when I did something similar the behavior of passing
"-it" to "docker run" or not could be unified by using this trick:
  CMD [ "/bin/sh", "-c", "if ! [ -e /dev/console ] ; then
  socat -u pty,link=/dev/console stdout & fi ; exec /sbin/init" ]
(In one line of the Dockerfile, you may need to use Entrypoint in your
case.)

Regards,
Kai



[Index of Archives]     [LARTC]     [Bugtraq]     [Yosemite Forum]     [Photo]

  Powered by Linux