Giter Club home page Giter Club logo

docker-ansible's Introduction

Setup a docker container and customize it with ansible

Prerequisites

In order for this to work, you must have:

  • docker >= 1.10.0
  • ansible >= 1.9
  • python-jinja2
  • python-yaml
  • docker-py (install with pip)

For ubuntu, you can copy/paste

 sudo apt-get install ansible python-jinja2 python-yaml
 sudo pip install docker-py

Usage

For DNS local settings to be automatically integrated in /etc/resolv.conf, either :

...
volumes: "{{ the_volumes }}"
dns:
  - x.x.x.x
  - y.y.y.y
  • edit your /etc/default/docker file :
DOCKER_OPTS="--dns x.x.x.x --dns y.y.y.y"

Copy vars_example.yml in vars.yml and set the parameters

Execute ./launch.sh path_to_save_docker_home_folder

When the execution is over, you can enter the freshly configured docker with ./enter.sh

If something goes wrong (Or you want to freshly restart for whatever reason), you can wipe everything with STOP_AND_DELETE_ALL.sh

What the script does

  • build the docker image if you don't have it
  • creates a user developer
  • no password, sudoer
  • same uid of you
  • create an instance of the docker image
  • mount /tmp/.X11-unix into /tmp/.X11-unix
  • set your $DISPLAY variable into docker
  • launch ansible

Misc

The graphical capabilities are based on the work of http://fabiorehm.com/blog/2014/09/11/running-gui-apps-with-docker/

Changes

  • 2015-04-12
    • ssh is not needed anymore (ansible connection plugin)
    • docker is not a dockerception, but the docker host exposed inside the container (not very secure, but this is for a development environment)

docker-ansible's People

Contributors

bamthomas avatar michaelbitard avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

docker-ansible's Issues

Connexion au serveur X11

Salut Michael,

Il me semble que si tu n'installes pas le paquet X11-utils dans le docker, la connexion au serveur graphique ne fonctionne pas.

testé avec intellij -> erreur java.lang.NoClassDefFoundError: Could not initialize class java.awt.Toolkit

Après l'installation du paquet, ça fonctionne.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.