-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
52 lines (40 loc) · 1.31 KB
/
Dockerfile
File metadata and controls
52 lines (40 loc) · 1.31 KB
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
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
FROM ubuntu:14.10
MAINTAINER thomas.herlea@owasp.org
# Network services
EXPOSE 22 80 443
# Software
RUN apt-get update && apt-get install -y \
apache2 \
libapache2-mod-php5 \
nano \
openssh-server \
supervisor \
vim
# TODO: Necessary?
RUN mkdir -p \
/var/lock/apache2 \
/var/run/apache2 \
/var/run/sshd \
/var/log/supervisor
# Provide supervisor configuration
COPY supervisord.conf /etc/supervisor/conf.d/supervisord.conf
# Provide Certification Authority simulation scripts
COPY ca /root/ca
# (The distinct user credentials per container approach is temporarily
# suspended in favour of root access with shared password.)
# User management
# --disabled-login is used to enable unattended user creation, especially
# since passwords will be managed from outside the container
#RUN adduser --gecos 'Student of "Using TLS"' --disabled-login student && adduser student sudo
# Root access with shared password
RUN echo 'root:secappdev' | chpasswd
RUN sed -i 's/PermitRootLogin without-password/PermitRootLogin yes/' /etc/ssh/sshd_config
# Default command
CMD ["/usr/bin/supervisord", "-c", "/etc/supervisor/supervisord.conf"]
# Documentation
# Built with:
# $ build_image.sh
# Follow any instructions from the script.
# Run with:
# XX=01 # XX is a two-digit integer identifying a student
# run_one.sh "${XX}"