5 docker pull clearlinux/keystone
7 # set a couple of useful env. vars
8 YOUR_HOST=`hostname -f`
9 MYSQL_DATA_DIR=/var/lib/mysql/
11 # generate certificates
12 echo "START Artifact Generation"
14 CERT_NAME=keystone_cert
15 openssl req -x509 -nodes -days 365 -newkey rsa:2048 -keyout keystone_key.pem \
16 -out $CERT_NAME.pem -subj "/CN=$YOUR_HOST"
17 echo "END Artifact Generation"
20 echo "START Starting Container"
22 docker run -d -it --name keystone -p 5000:5000 -p 35357:35357 \
24 -e IDENTITY_HOST="$YOUR_HOST" \
25 -e KEYSTONE_ADMIN_PASSWORD="secret" \
26 -v $MYSQL_DATA_DIR:/var/lib/mysql:Z \
27 -v `pwd`/keystone_cert.pem:/etc/nginx/ssl/keystone_cert.pem:Z \
28 -v `pwd`/keystone_key.pem:/etc/nginx/ssl/keystone_key.pem:Z \
32 echo "END Starting Container"