#!/bin/bash set -e # Set the user dynamically during runtime based on an environment variable if [ -n "$USER_ID" ]; then adduser --disabled-password --gecos '' --uid $USER_ID user fi # Run the CMD exec "$@"