forked from Tiaonmmn/csawqual_2016_web_i_got_id
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathDockerfile
More file actions
14 lines (14 loc) · 702 Bytes
/
Dockerfile
File metadata and controls
14 lines (14 loc) · 702 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
FROM alpine
LABEL Author="Tiaonmmn.ZMZ"
COPY files/src/ /var/www/localhost/cgi-bin/
COPY files/flag /
RUN sed -i 's/dl-cdn.alpinelinux.org/mirrors.ustc.edu.cn/g' /etc/apk/repositories &&\
apk update &&\
apk add apache2 perl perl-cgi &&\
sed -i "s:#LoadModule cgi_module modules/mod_cgi.so:LoadModule cgi_module modules/mod_cgi.so:" /etc/apache2/httpd.conf &&\
rm -rfv /var/www/localhost/cgi-bin/printenv* &&\
rm -rfv /var/www/localhost/cgi-bin/test-cgi &&\
mv /var/www/localhost/cgi-bin/index.html /var/www/localhost/htdocs &&\
chmod +x /var/www/localhost/cgi-bin/*
EXPOSE 80
CMD echo $FLAG > /flag && export FLAG=not_flag && FLAG=not_flag && /usr/sbin/httpd -D FOREGROUND