Skip to content

Instantly share code, notes, and snippets.

@mistymagich
Created May 6, 2016 11:18
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mistymagich/be06651710dd04d63bb64d03d76207dd to your computer and use it in GitHub Desktop.
Save mistymagich/be06651710dd04d63bb64d03d76207dd to your computer and use it in GitHub Desktop.
FROM httpd:2.4
# prepare
RUN apt-get update
RUN apt-get -y install ruby wget git
# install gyazo
RUN install -d -m 755 -g daemon -o daemon /usr/local/apache2/htdocs/data
RUN install -d -m 755 -g daemon -o daemon /usr/local/apache2/htdocs/db
RUN wget -O /usr/local/apache2/htdocs/upload.cgi https://raw.githubusercontent.com/gyazo/Gyazo/master/Server/upload.cgi
RUN sed -i -e "s/gyazo.com/[SERVERDOMAIN]\/data/" /usr/local/apache2/htdocs/upload.cgi
RUN chown daemon:daemon /usr/local/apache2/htdocs/upload.cgi
RUN chmod +x /usr/local/apache2/htdocs/upload.cgi
# httpd settings
RUN sed -i -e 's/#LoadModule cgid_module/LoadModule cgid_module/' /usr/local/apache2/conf/httpd.conf
RUN sed -i -e 's/#AddHandler cgi-script/AddHandler cgi-script/' /usr/local/apache2/conf/httpd.conf
RUN sed -i -e 's/Options Indexes FollowSymLinks/Options FollowSymLinks ExecCGI/' /usr/local/apache2/conf/httpd.conf
# clean
RUN apt-get clean && rm -rf /var/cache/apt/archives/* /var/lib/apt/lists/*
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment