-
Notifications
You must be signed in to change notification settings - Fork 3
/
Dockerfile-VM
121 lines (88 loc) · 2.8 KB
/
Dockerfile-VM
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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
FROM debian:8.5
MAINTAINER John Clements <[email protected]>
WORKDIR /root
USER root
RUN apt-get update
RUN apt-get install -y wget
ENV DEBIAN_FRONTEND noninteractive
#
# Install Apache
#
RUN apt-get install -y apache2
#
# Install mod_auth_openidc
#
# Dependencies
RUN apt-get install -y libcurl3 libjansson4
#RUN wget https://github.com/pingidentity/mod_auth_openidc/releases/download/v1.3/libapache2-mod-auth-openidc_1.3_amd64.deb
RUN wget https://github.com/pingidentity/mod_auth_openidc/releases/download/v1.5/libapache2-mod-auth-openidc_1.5_amd64.deb
#RUN wget https://github.com/pingidentity/mod_auth_openidc/releases/download/v1.5.3/libapache2-mod-auth-openidc_1.5.3-2_amd64.deb
RUN dpkg -i libapache2-mod-auth-openidc_1.5_amd64.deb
#
# Configure Apache
#
RUN a2enmod proxy
RUN a2enmod proxy_http
#
# Install Racket
#
RUN wget https://mirror.racket-lang.org/installers/6.6/racket-6.6-x86_64-linux.sh
RUN sh ./racket-6.6-x86_64-linux.sh
RUN ln -s /usr/racket/bin/racket /usr/local/bin/racket
RUN ln -s /usr/racket/bin/raco /usr/local/bin/raco
# Setup Captain Teach Server
# Create User
RUN adduser --disabled-password --gecos "" admiraledu
# Install Captain Teach Server
RUN raco pkg install --auto admiral-edu-server
#
# Install supervisord
#
RUN apt-get install -y supervisor
#
# Install zip / unzip utilities
#
RUN apt-get install -y zip unzip
#######################################################################
# Add captain-teach apache configuration file
# This file specifies how the user is authenticated
# Note: You need to modify this file
#######################################################################
ADD docker/captain-teach-vm.conf /etc/apache2/conf-available/captain-teach.conf
RUN a2enconf captain-teach
RUN mkdir -p /home/admiraledu/files
RUN chown admiraledu /home/admiraledu/files
RUN chgrp admiraledu /home/admiraledu/files
#
# Copy Captain Teach Scripts, Images, CSS
#
ADD html/bin /var/www/html/bin
ADD html/css /var/www/html/css
ADD html/imgs /var/www/html/imgs
ADD code-mirror/mode /var/www/html/mode
ADD code-mirror/lib /var/www/html/lib
ADD html/logout.html /var/www/html/logout.html
#
# Configure Supervisor
#
ADD docker/supervisord.conf /etc/supervisor/conf.d/supervisord.conf
#
# Apache fails to start on install since it has unbound variables. That puts
# it into an inconsistent state. The line below cleans up.
#
RUN service apache2 start; service apache2 stop
#
# Add Debug Script
#
ADD docker/debug.sh /root/debug.sh
RUN chmod +x /root/debug.sh
#
# Add some default rubrics for testing purposes
#
ADD rubrics/implementation-rubric.json /home/admiraledu/reviews/cmpsci220/clock/implementation/rubric.json
ADD rubrics/tests-rubric.json /home/admiraledu/reviews/cmpsci220/clock/tests/rubric.json
ADD html/index.html /var/www/html/index.html
#
# Run AdmiralEdu
#
CMD supervisord