Skip to content

Instantly share code, notes, and snippets.

@Apsu
Last active August 29, 2015 13:57
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Apsu/9819182 to your computer and use it in GitHub Desktop.
Save Apsu/9819182 to your computer and use it in GitHub Desktop.
Keystone container from source
FROM ubuntu:12.04
# Keystone service and admin API
EXPOSE 5000 35357
# Generate locale files
RUN locale-gen en_US.UTF-8
# Export it
ENV LANG en_US.UTF-8
# Set the env variable DEBIAN_FRONTEND to noninteractive
ENV DEBIAN_FRONTEND noninteractive
# Hold these so upgrades don't blow shit up
RUN apt-mark hold initscripts udev plymouth mountall
# Update, upgrade
RUN apt-get update
RUN apt-get upgrade -y
# Install python bits for keystone, git and build tools
RUN apt-get -y install git-core python-setuptools python-pip python-dev build-essential libxslt1-dev libxml2-dev libsqlite3-dev libldap2-dev libsasl2-dev
# Upgrade pip by cheating horribly
RUN pip install --upgrade pip
# Clone it
RUN git clone https://github.com/openstack/keystone
# Check it out
RUN cd keystone; git checkout stable/havana
# Install deps
RUN cd keystone; pip install -r requirements.txt
# Install keystone
RUN cd keystone; python setup.py install
# Copy config files and use the sample
RUN cp -a keystone/etc /etc/keystone
RUN mv /etc/keystone/keystone.conf.sample /etc/keystone/keystone.conf
# Run that sucker
CMD keystone-all
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment