Merge pull request #25 from xarses/dockerfile

Add dockerfile to build container
This commit is contained in:
Dmitry Shulyak 2015-04-07 17:14:57 -07:00
commit b0813c85a8
5 changed files with 29 additions and 8 deletions

17
Dockerfile Normal file
View File

@ -0,0 +1,17 @@
FROM debian:jessie
MAINTAINER Andrew Woodward awoodward@mirantis.com
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get -y install --fix-missing \
curl \
ssh \
ansible \
python-pip
ADD . /vagrant/
WORKDIR /vagrant
RUN ansible-playbook -i "localhost," -c local main.yml
VOLUME /vagrant

2
Vagrantfile vendored
View File

@ -8,7 +8,7 @@ init_script = <<SCRIPT
apt-get update
apt-get -y install python-pip python-dev
pip install ansible
ansible-playbook -i "localhost," -c local /vagrant/main.yml
ansible-playbook -i "localhost," -c local /vagrant/main.yml /vagrant/docker.yml
SCRIPT
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|

9
docker.yml Normal file
View File

@ -0,0 +1,9 @@
- hosts: all
sudo: yes
tasks:
- shell: docker --version
ignore_errors: true
register: docker_version
- shell: curl -sSL https://get.docker.com/ | sudo sh
when: docker_version | failed
- shell: docker pull debian:jessie

View File

@ -2,7 +2,8 @@
- hosts: all
sudo: yes
tasks:
- shell: sh /vagrant/kolla/tools/genenv
- git: repo=https://github.com/stackforge/kolla.git
- shell: sh kolla/tools/genenv
- shell: docker pull {{item}}
with_items:
- kollaglue/centos-rdo-glance-registry

View File

@ -3,12 +3,6 @@
- hosts: all
sudo: yes
tasks:
- shell: docker --version
ignore_errors: true
register: docker_version
- shell: curl -sSL https://get.docker.com/ | sudo sh
when: docker_version | failed
- shell: docker pull debian:jessie
# Setup additional development tools
- apt: name=vim state=present
- apt: name=tmux state=present