Public | Automated Build

Last pushed: 2 years ago
Short Description
These are base docker images that include Ansible and useful script.
Full Description

ThoughtWorks Docker-Base

These are base docker images that include Ansible and useful script.

Obtaining these Images from DockerHub

Content on DockerHub lives at https://registry.hub.docker.com/u/twdevops/

There are base images available currently for Ubuntu 14.04 LTS.

Description

Add a useful script to help the ansible to build the images, that script can load the Docker's envionment variables to ansible.

Sample

###Dockerfile:

FROM twdevops/base

ENV MYSQL_VERSION 5.6
ENV MYSQL_PORT 3306
ENV MYSQL_ROOT_PASSWORD monster01

ENV MYSQL_USERS     [{name:travel,pass:monster01,host:%}]   # Ansible can use it.
ENV MYSQL_DATABASES [{name:travel_production,collation:utf8_general_ci,encoding:utf8}]

ADD site.yml site.yml
RUN ansible-build site.yml -c local

###site.yml:

- hosts: localhost

  vars:
    mysql_key_buffer: 16M
    mysql_max_allowed_packet: 16M
    mysql_thread_stack: 192K
    mysql_cache_size: 8
    mysql_myisam_recover: BACKUP
    mysql_max_connections: 1024
    mysql_table_cache: 64
    thread_concurrency: 10

    mysql_query_cache_limit: 1M
    mysql_query_cache_size: 16M

  tasks:
    - name: install
      apt: name={{ item }} state=present
      with_items: 
        - mysql-server-{{ mysql_version }}
        - python-mysqldb
Docker Pull Command
Owner
twdevops
Source Repository

Comments (0)