forked from AlexGaspar/docker-fbctf
-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathDockerfile
36 lines (23 loc) · 905 Bytes
/
Dockerfile
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
FROM brunoric/hhvm:deb-hhvm
ENV CTF_PATH /var/www/fbctf
ENV DEBIAN_FRONTEND noninteractive
ENV CTF_REPO https://github.com/facebook/fbctf.git
RUN apt-get update && apt-get install -y --force-yes curl language-pack-en git npm nodejs-legacy nginx mysql-client
# Install Composer
RUN curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer
RUN mkdir -p $CTF_PATH
WORKDIR $CTF_PATH
# Install CTF
RUN git clone --depth 1 $CTF_REPO .
# Install Vendors
RUN composer install
# Build assets
RUN npm install && npm install -g grunt && npm install -g flow-bin
RUN grunt
# Add nginx configuration
COPY ["templates/fbctf.conf", "templates/fbctf_ssl.tmpl.conf", "/etc/nginx/sites-available/"];
COPY ["templates/settings.tmpl.ini", "entrypoint.sh", "./"]
RUN chmod +x entrypoint.sh
EXPOSE 80 443
ENTRYPOINT ["./entrypoint.sh"]
CMD ["nginx", "-g", "daemon off;"]