Merge pull request #25 from xarses/dockerfile
Add dockerfile to build container
This commit is contained in:
commit
b0813c85a8
17
Dockerfile
Normal file
17
Dockerfile
Normal 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
2
Vagrantfile
vendored
@ -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
9
docker.yml
Normal 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
|
@ -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
|
6
main.yml
6
main.yml
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user