-
Notifications
You must be signed in to change notification settings - Fork 284
Expand file tree
/
Copy pathDockerfile
More file actions
26 lines (21 loc) · 818 Bytes
/
Dockerfile
File metadata and controls
26 lines (21 loc) · 818 Bytes
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
FROM ubuntu:bionic
RUN apt-get update && \
apt-get install -y \
git curl zip unzip psmisc \
tmux sudo emacs openssh-server net-tools x11-apps \
build-essential libssl-dev libffi-dev python-dev \
python-setuptools python-jinja2 python-yaml
# Create a non-root user account to run Ansible.
RUN adduser bofh --disabled-password
# Grant the 'bofh' user sudo access, so that we can start sshd.
RUN adduser bofh sudo
RUN echo "bofh:x" | chpasswd
COPY home/ /home/bofh/
RUN chown -R bofh:bofh /home/bofh
# Switch over to the 'bofh' user, since root access is no longer required
USER bofh
WORKDIR /home/bofh
# Get vulnerable version of Ansible source code.
RUN git clone https://github.com/ansible/ansible.git && \
cd ansible && \
git checkout f9f7b29a5a5543e8d1c25e8cc1f2d3040d8536b7