#!/usr/bin/env bash set -e IMAGE=rclone/test-smb-kerberos NAME=smb-kerberos USER=rclone DOMAIN=RCLONE REALM=RCLONE.LOCAL SMB_PORT=28633 KRB5_PORT=28634 # KRB5_CONFIG and KRB5CCNAME should be set by the caller but default # them here for the integration tests export TEMP_DIR=/tmp/rclone_krb5 mkdir -p "${TEMP_DIR}" export KRB5_CONFIG=${KRB5_CONFIG:-${TEMP_DIR}/krb5.conf} export KRB5CCNAME=${KRB5CCNAME:-${TEMP_DIR}/ccache} . $(dirname "$0")/docker.bash start() { docker build -t ${IMAGE} --load - <> /etc/samba/smb.conf [global] server signing = auto [public] path = /share browseable = yes read only = yes guest ok = yes [rclone] path = /rclone browseable = yes read only = no guest ok = no valid users = rclone EOS CMD ["samba", "-i"] EOF docker run --rm -d --name ${NAME} \ -p 127.0.0.1:${SMB_PORT}:445 \ -p 127.0.0.1:${SMB_PORT}:445/udp \ -p 127.0.0.1:${KRB5_PORT}:88 \ ${IMAGE} # KRB5_CONFIG and KRB5CCNAME are set by the caller cat > ${KRB5_CONFIG} <