<commit_before>#                      _           _          _    
#    /\/\   __ _  __ _(_) ___ __ _| /\_/\__ _| | __
#   /    \ / _` |/ _` | |/ __/ _` | \_ _/ _` | |/ /
#  / /\/\ \ (_| | (_| | | (_| (_| | |/ \ (_| |   < 
#  \/    \/\__,_|\__, |_|\___\__,_|_|\_/\__,_|_|\_\
#                |___/                             

FROM lsiobase/xenial
MAINTAINER "magicalyak" <<EMAIL>>

# global environment settings
ENV ANSIBLE_TOWER_VER=latest \
ADMIN_PASSWORD=<PASSWORD> \
SERVER_NAME=localhost

ADD ./inventory /opt/inventory
ADD ./tower_setup_conf.yml /opt/tower_setup_conf.yml

RUN \
 apt-get -y update && \
 apt-get install -y software-properties-common && \
 apt-add-repository -y ppa:ansible/ansible && \
 apt-get -y update && \
 apt-get install -y sudo wget ansible && \

# install Ansible Tower
 cd /opt && \
 wget http://releases.ansible.com/awx/setup/ansible-tower-setup-${ANSIBLE_TOWER_VER}.tar.gz && \
 tar -xvf ansible-tower-setup-${ANSIBLE_TOWER_VER}.tar.gz && \
 rm -rf ansible-tower-setup-${ANSIBLE_TOWER_VER}.tar.gz && \
 mv ansible-tower-setup-* /opt/tower-setup && \
 mv /opt/inventory /opt/tower-setup/inventory && \ 
 mv /opt/tower_setup_conf.yml /opt/tower-setup/tower_setup_conf.yml && \

# add passwords and fix locale issue
 sed -i "s/changeme/${ADMIN_PASSWORD}/g" /opt/tower-setup/inventory && \
 sed -i "s/lc_/#lc_/g" /opt/tower-setup/roles/postgres/templates/postgresql.conf.j2 && \
 sed -i "s/ansible_all_ipv6_addresses/[]/g" /opt/tower-setup/roles/nginx/templates/nginx.conf && \
 cd /opt/tower-setup && \
 ./setup.sh && \

# cleanup
 apt-get clean && \
 rm -rf \
        /opt/tower-setup/* \
        /tmp/* \
        /var/lib/apt/lists/* \
        /var/tmp/*

# ports and volumes
EXPOSE 443 8080
VOLUME /var/lib/postgresql/9.4/main /certs

# set runtime (from ybalt/ansible-tower)
ADD docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh && \
    chown postgres:postgres /var/lib/postgresql/9.4/main
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["ansible-tower"]
<commit_msg>minor fixes<commit_after>#                      _           _          _    
#    /\/\   __ _  __ _(_) ___ __ _| /\_/\__ _| | __
#   /    \ / _` |/ _` | |/ __/ _` | \_ _/ _` | |/ /
#  / /\/\ \ (_| | (_| | | (_| (_| | |/ \ (_| |   < 
#  \/    \/\__,_|\__, |_|\___\__,_|_|\_/\__,_|_|\_\
#                |___/                             

FROM lsiobase/xenial
MAINTAINER "magicalyak" <<EMAIL>>

# global environment settings
ENV ANSIBLE_TOWER_VER=latest \
ADMIN_PASSWORD=<PASSWORD> \
SERVER_NAME=localhost

ADD ./inventory /opt/inventory

RUN \
 apt-get -y update && \
 apt-get install -y software-properties-common && \
 apt-add-repository -y ppa:ansible/ansible && \
 apt-get -y update && \
 apt-get install -y sudo wget ansible && \

# install Ansible Tower
 cd /opt && \
 wget http://releases.ansible.com/awx/setup/ansible-tower-setup-${ANSIBLE_TOWER_VER}.tar.gz && \
 tar -xvf ansible-tower-setup-${ANSIBLE_TOWER_VER}.tar.gz && \
 rm -rf ansible-tower-setup-${ANSIBLE_TOWER_VER}.tar.gz && \
 mv ansible-tower-setup-* /opt/tower-setup && \
 mv /opt/inventory /opt/tower-setup/inventory && \ 

# add passwords and fix locale issue
 sed -i "s/changeme/${ADMIN_PASSWORD}/g" /opt/tower-setup/inventory && \
 sed -i "s/lc_/#lc_/g" /opt/tower-setup/roles/postgres/templates/postgresql.conf.j2 && \
 sed -i "s/ansible_all_ipv6_addresses/[]/g" /opt/tower-setup/roles/nginx/templates/nginx.conf && \
 cd /opt/tower-setup && \
 ./setup.sh && \

# cleanup
 apt-get clean && \
 rm -rf \
        /opt/tower-setup/* \
        /tmp/* \
        /var/lib/apt/lists/* \
        /var/tmp/*

# ports and volumes
EXPOSE 443 8080
VOLUME /var/lib/postgresql/9.4/main /certs

# set runtime (from ybalt/ansible-tower)
ADD docker-entrypoint.sh /docker-entrypoint.sh
RUN chmod +x /docker-entrypoint.sh
ENTRYPOINT ["/docker-entrypoint.sh"]
CMD ["ansible-tower"]

{'fraction_non_alphanumeric': 0.18245341614906832, 'fraction_numerical': 0.006211180124223602, 'mean_word_length': 2.2370184254606365, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 4, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '553601', 'n_tokens_mistral': 1583, 'n_tokens_neox': 1514, 'n_words': 228}