You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

16 lines
508 B

# This won't be executed if keys already exist (i.e. from a volume)
ssh-keygen -A
# Copy authorized keys from ENV variable
groupmod --non-unique --gid "$GROUPID" data
usermod --non-unique --home "$DATADIR" --uid "$USERID" --gid "$GROUPID" "$OWNER"
# Chown data folder (if mounted as a volume for the first time)
chown "${OWNER}:data" "$DATADIR"
# Run sshd on container start
exec /usr/sbin/sshd -D -e