Skip to content

Instantly share code, notes, and snippets.

@ytakano
Created December 11, 2023 01:11
Show Gist options
  • Save ytakano/45674a74d58deda1460e7c5ac8c5e9d6 to your computer and use it in GitHub Desktop.
Save ytakano/45674a74d58deda1460e7c5ac8c5e9d6 to your computer and use it in GitHub Desktop.
OpenBSD src
version: '3'
services:
openbsd_src:
build: .
stdin_open: true
tty: true
ports:
- "8001:80"
FROM httpd:2.4
ARG TITLE="OpenBSD"
ARG GIT=https://github.com/openbsd/src.git
#RUN sed -i 's/deb\.debian\.org/ftp\.jaist\.ac\.jp\/pub\/Linux/g' /etc/apt/sources.list
RUN apt-get -y update && \
apt-get -y upgrade && \
apt-get install -y tzdata
# timezone setting
ENV TZ=Asia/Tokyo
RUN apt-get -y install zsh git global
RUN cd /usr/local/apache2 && \
rm -rf htdocs && \
git clone --depth=1 $GIT htdocs && \
cd htdocs && \
gtags && \
htags --suggest2 -t "$TITLE"
RUN sed -i 's/#LoadModule cgid_module modules/LoadModule cgid_module modules/g; \
s/#AddHandler cgi-script/AddHandler cgi-script/g' \
/usr/local/apache2/conf/httpd.conf
RUN echo \
'<Directory "/usr/local/apache2/htdocs/HTML/cgi-bin">\n\
Options +ExecCGI\n\
AddHandler cgi-script .cgi\n\
</Directory>' >> /usr/local/apache2/conf/httpd.conf
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment