Last active
January 17, 2019 14:58
-
-
Save horitaku1124/2e3e0ee6e4ac7abd938cd461aac4e51d to your computer and use it in GitHub Desktop.
sample multi stage build
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
FROM centos:latest as builder | |
MAINTAINER Horimatsu Takuya | |
WORKDIR /root | |
RUN yum install -y git ruby gcc make httpd-devel openssl-devel bison | |
RUN git clone https://github.com/matsumotory/mod_mruby.git | |
WORKDIR /root/mod_mruby | |
RUN chmod +x build.sh | |
RUN ./build.sh | |
# COPY ./src/.libs/mod_mruby.so . | |
FROM centos:latest | |
RUN yum install -y httpd less perl postfix httpd-devel | |
RUN echo 'LoadModule cgi_module libexec/apache2/mod_cgi.so' >> /etc/httpd/conf/httpd.conf | |
RUN echo 'LoadModule actions_module libexec/apache2/mod_actions.so' >> /etc/httpd/conf/httpd.conf | |
RUN sed -ie 's/AllowOverride None/AllowOverride All/' /etc/httpd/conf/httpd.conf | |
RUN sed -ie 's/Options Indexes FollowSymLinks/Options +ExecCGI/' /etc/httpd/conf/httpd.conf | |
RUN mkdir /var/lib/mruby | |
COPY vhosts.conf /etc/httpd/conf.d/ | |
COPY --from=builder /root/mod_mruby/src/.libs/mod_mruby.so /root | |
COPY http_filter.rb /var/lib/mruby | |
RUN /usr/bin/apxs -i -a -n 'mruby' /root/mod_mruby.so |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment