#!/bin/bash
set -eux

local_ssh_port=12222
container_name=devenv
image_name=kiyoad/devenv
export_local_dir=/Users/kiyoad/Documents

docker run -d -p 127.0.0.1:${local_ssh_port}:22 -v ${export_local_dir}:/home/developer/Documents --name=${container_name} ${image_name}

#!/bin/bash
set -eux

local_ssh_port=12222
container_name=devenv
image_name=kiyoad/devenv
export_local_dir=/Users/kiyoad/Documents
id=$(date '+%Y%m%d')

docker run -d -p 127.0.0.1:${local_ssh_port}:22 -v ${export_local_dir}:/home/developer/Documents --hostname=${container_name} --name=${container_name}_${id} ${image_name}_${id}

Add date info for the container name for MacOSX
Add date info for the container name for MacOSX

And use --hostname for the container.
