aboutsummaryrefslogtreecommitdiff
path: root/Dockerfile_xenial_ssh
blob: bda2c5d74b33880bd80199d075960f16a4132ea5 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Builds ubuntu latest image from docker hub
# Install and setups ansible
# Run from ansible dir: "docker build -t ansible_deploy ."
# You will need to update the playbook you deploy in this file.

FROM ubuntu:16.04

LABEL maintainer="Ben Copeland <ben.copeland@linaro.org>"

ENV DEBIAN_FRONTEND=noninteractive

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

RUN apt-get update && apt-get install -y ansible vim bash openssh-server python-apt sudo cron git

RUN mkdir -p /root/.ssh/ && mkdir -p /var/run/sshd
ADD pubkeys /root/.ssh/authorized_keys

# add playbooks/roles to the image.


RUN cd /tmp \
 && git clone https://git.linaro.org/infrastructure/ansible-playbooks \
 && cd /tmp/ansible-playbooks \
 && rm secrets \
 && mkdir -p secrets/group_vars \
 && echo "ssh_ldap_bindpw: xxxx" >> secrets/group_vars/all \ # fill in password
 && ansible-playbook -v -c local -i hosts -l android.linaro.org ssh-ldap.yml -e ldap_cache_url="" -e sudo_groups=systems -e login_groups=systems

CMD /usr/sbin/sshd -D