Skip to content

Instantly share code, notes, and snippets.

@kconde2
Forked from ttwthomas/docker-compose.yml
Last active June 14, 2020 17:42
Show Gist options
  • Save kconde2/4fed396934c43b19592421fe0f004777 to your computer and use it in GitHub Desktop.
Save kconde2/4fed396934c43b19592421fe0f004777 to your computer and use it in GitHub Desktop.
version: '3'
services:
master:
build:
context: .
dockerfile: ./master.Dockerfile
working_dir: /root/playbooks
volumes:
- /c/repos/ansible/playbooks:/root/playbooks
- /c/repos/ansible/config:/etc/ansible
command: tail -f /dev/null
web:
build:
context: .
dockerfile: ./server.Dockerfile
db:
build:
context: .
dockerfile: ./server.Dockerfile
lb:
build:
context: .
dockerfile: ./server.Dockerfile
ports:
- 8080:80
FROM williamyeh/ansible:debian9
RUN apt-get update && apt-get install -y vim python net-tools telnet curl
FROM ubuntu:16.04
RUN apt-get update && apt-get install -y openssh-server vim python net-tools telnet
RUN mkdir /var/run/sshd
RUN echo 'root:ansible' | chpasswd
RUN sed -i 's/PermitRootLogin prohibit-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# SSH login fix. Otherwise user is kicked off after login
RUN sed 's@session\s*required\s*pam_loginuid.so@session optional pam_loginuid.so@g' -i /etc/pam.d/sshd
ENV NOTVISIBLE "in users profile"
RUN echo "export VISIBLE=now" >> /etc/profile
EXPOSE 22
CMD ["/usr/sbin/sshd", "-D"]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment