(
hostname=`hostname -s`
- # we got to normalize so we only have allowed strings, this is more comprehensive but lets see how bash does first
- # hostname=`$docker_path run $user_args --rm $image ruby -e 'print ARGV[0].gsub(/[^a-zA-Z-]/, "-")' $hostname`
- # docker added more hostname rules
- hostname=${hostname/_/-}
# overwrite hostname
if [ "$DOCKER_USE_HOSTNAME" = "true" ]
then
hostname=$hostname-$config
fi
+ # we got to normalize so we only have allowed strings, this is more comprehensive but lets see how bash does first
+ # hostname=`$docker_path run $user_args --rm $image ruby -e 'print ARGV[0].gsub(/[^a-zA-Z-]/, "-")' $hostname`
+ # docker added more hostname rules
+ hostname=${hostname/_/-}
+
set -x
$docker_path run $user_args $links $attach_on_run $restart_policy "${env[@]}" -h "$hostname" \
-e DOCKER_HOST_IP=$docker_ip --name $config -t $ports $volumes $docker_args $run_image $boot_command