Rendre le montage de la clé SSH désactivable (LIDAR_MOUNT_SSH=0)
This commit is contained in:
5
run.sh
5
run.sh
@ -321,9 +321,10 @@ if [ "$WEBAPP_FLAG" -eq 1 ]; then
|
||||
[ -n "$LIDAR_REMOTE_TOKEN" ] && WEBAPP_ENV+=(-e LIDAR_REMOTE_TOKEN="$LIDAR_REMOTE_TOKEN")
|
||||
[ -n "$LIDAR_API_TOKEN" ] && WEBAPP_ENV+=(-e LIDAR_API_TOKEN="$LIDAR_API_TOKEN")
|
||||
[ -n "${LIDAR_REGEN_CIDR:-}" ] && WEBAPP_ENV+=(-e LIDAR_REGEN_CIDR="$LIDAR_REGEN_CIDR")
|
||||
# Clé SSH du hôte (déploiement, git pull distant) : montée en lecture seule si présente
|
||||
# Clé SSH du hôte (déploiement, git pull distant) : montée en lecture seule
|
||||
# si présente. LIDAR_MOUNT_SSH=0 pour ne PAS l'exposer au conteneur.
|
||||
WEBAPP_SSH=()
|
||||
[ -d "${HOME}/.ssh" ] && WEBAPP_SSH+=(-v "${HOME}/.ssh:/home/lidar/.ssh:ro")
|
||||
[ "${LIDAR_MOUNT_SSH:-1}" = "1" ] && [ -d "${HOME}/.ssh" ] && WEBAPP_SSH+=(-v "${HOME}/.ssh:/home/lidar/.ssh:ro")
|
||||
exec docker run --rm --init \
|
||||
--user 1000:1000 \
|
||||
-p "${WEBAPP_SERVE_PORT}:8973" \
|
||||
|
||||
Reference in New Issue
Block a user