forked from takayamaki/dodontof-docker
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathDockerfile
40 lines (35 loc) · 1.68 KB
/
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
37
38
39
40
FROM alpine:3.7
LABEL maintainer "frfs"
RUN apk add --no-cache ruby ruby-dev alpine-sdk apache2 logrotate ca-certificates &&\
gem install --no-ri --no-rdoc json &&\
sed -i -e 's%/var/log/messages%#/var/log/messages%' /etc/logrotate.conf &&\
mkdir -p /run/apache2 &&\
sed -i -e 's%#LoadModule cgi_module modules/mod_cgi.so%LoadModule cgi_module modules/mod_cgi.so%' /etc/apache2/httpd.conf&&\
apk del --purge alpine-sdk ruby-dev &&\
rm -f ~/.ash_history
COPY dodontof.conf /etc/apache2/conf.d/
RUN apk add --no-cache --virtual deps wget &&\
mkdir -p /work && cd /work &&\
wget -nv -O dodontof.zip http://www.dodontof.com/DodontoF/DodontoF_Ver.1.49.04.01.zip &&\
unzip -q dodontof.zip && rm dodontof.zip && cd DodontoF_WebSet/public_html &&\
chmod 705 ../saveData \
imageUploadSpace \
imageUploadSpace/smallImages \
DodontoF \
DodontoF/DodontoFServer.rb \
DodontoF/saveDataTempSpace \
DodontoF/fileUploadSpace \
DodontoF/replayDataUploadSpace &&\
chmod 600 DodontoF/log.txt \
DodontoF/log.txt.0 &&\
mv ../saveData /var/www/localhost/ &&\
mv ./* /var/www/localhost/htdocs/ &&\
sed -i -e 's%#!/usr/local/bin/ruby -Ku%#!/usr/bin/ruby%' /var/www/localhost/htdocs/DodontoF/DodontoFServer.rb &&\
cd / &&\
rm -rf /work &&\
chown apache:apache -R /var/www/localhost/saveData /var/www/localhost/htdocs/* &&\
rm -f /var/www/localhost/htdocs/DodontoF/src_actionScript.zip &&\
rm -f ~/.ash_history ~/.wget-hsts &&\
apk del --purge deps
EXPOSE 80
CMD httpd -D FOREGROUND