Run multiple services in a container

Run multiple services in a container

方法1

#!/bin/bash
set -m

/usr/sbin/sshd -D &
jupyter lab --no-browser --port=8889 &

fg %1

方法2

#!/bin/bash
# Start the first process
/usr/sbin/sshd -D &

# Start the second process
jupyter lab --no-browser --port=8889 &

# Wait for any process to exit
wait -n

# Exit with status of process that exited first
exit $?

参看

  • Run multiple services in a container

你可能感兴趣的:(Docker,docker)