2017-04-25 14:47:04 +02:00
|
|
|
# Build keystone. It needs to be run with
|
|
|
|
# --add-host=mariadb:<ip mariadb listens tp>
|
|
|
|
# Wen starting with an initialized db,
|
|
|
|
# run keystone-manage db_sync from this docker first:
|
|
|
|
# $ docker run hpc/keystone --add-host=mariadb:<ip mariadb> "keystone-manage db_sync"
|
|
|
|
|
2017-06-02 12:00:19 +02:00
|
|
|
# wellicht ubuntu 16.04 of anders 18.04
|
2017-06-16 15:21:44 +02:00
|
|
|
FROM ubuntu:16.04
|
|
|
|
|
|
|
|
RUN apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 5EDB1B62EC4926EA
|
2017-04-25 14:47:04 +02:00
|
|
|
|
2017-05-10 11:21:17 +02:00
|
|
|
RUN apt-get update
|
2017-04-25 14:47:04 +02:00
|
|
|
|
2017-06-16 15:21:44 +02:00
|
|
|
RUN set -x \
|
|
|
|
&& echo "deb http://ubuntu-cloud.archive.canonical.com/ubuntu xenial-updates/ocata main" > /etc/apt/sources.list.d/ocata.list \
|
|
|
|
&& apt-get -y update \
|
|
|
|
&& apt-get -y install ubuntu-cloud-keyring \
|
|
|
|
&& apt-get -y update \
|
|
|
|
&& apt-get -y install \
|
|
|
|
mysql-client \
|
|
|
|
python-mysqldb \
|
|
|
|
python-openstackclient \
|
|
|
|
keystone \
|
|
|
|
&& apt-get -y clean
|
2017-04-25 14:47:04 +02:00
|
|
|
|
|
|
|
# set admin token TODO: make this a secret
|
2017-06-02 12:00:19 +02:00
|
|
|
# in volume of met env
|
2017-05-11 15:55:05 +02:00
|
|
|
ADD keystone.conf /etc/keystone/keystone.conf
|
2017-04-25 14:47:04 +02:00
|
|
|
|
|
|
|
RUN mkdir /etc/keystone/fernet-keys
|
|
|
|
|
2017-05-11 15:55:05 +02:00
|
|
|
RUN chown keystone: /etc/keystone/fernet-keys
|
|
|
|
|
2017-06-16 15:21:44 +02:00
|
|
|
# TODO: move this somewhere else
|
|
|
|
ADD admin-openrc.sh /root/admin-openrc.sh
|
|
|
|
|
2017-04-25 14:47:04 +02:00
|
|
|
#RUN keystone-manage db_sync
|
2017-05-10 11:21:17 +02:00
|
|
|
CMD apachectl -DFOREGROUND
|
2017-04-25 14:47:04 +02:00
|
|
|
|