Working on a Dockerfile for keystone.

After seeing many keystone dockers on dockerhub but not a recent good
one. Decided to make my own...
This commit is contained in:
erijpkema 2017-04-21 16:28:59 +02:00
parent 729f7909d0
commit de87cd66f2
1 changed files with 20 additions and 0 deletions

View File

@ -0,0 +1,20 @@
FROM python:2.7
RUN git clone https://git.openstack.org/openstack/keystone.git
WORKDIR /keystone
RUN pip install MySQL-python==1.2.5 \
uWSGI==2.0.15 \
requests==2.12
CMD tail -f /dev/null
RUN pip install .
RUN mkdir /etc/keystone
RUN cp -R etc/* /etc/keystone/
RUN sed "s|database]|database]\nconnection = mysql://keystone:keystone@mariadb/keystone|g" /etc/keystone/keystone.conf.sample > /etc/keystone/keystone.conf
RUN sed -i 's/#admin_token = ADMIN/admin_token = SuperSecreteKeystoneToken/g' /etc/keystone/keystone.conf
RUN mkdir /etc/keystone/fernet-keys
RUN keystone-manage db_sync
RUN keystone-manage fernet_setup --keystone-user root --keystone-group root
CMD uwsgi --http 127.0.0.1:35357 --wsgi-file /usr/local/bin/keystone-wsgi-admin