Updated container files.
This commit is contained in:
@@ -4,11 +4,13 @@ MAINTAINER Jocelyn Fiat <jfiat@eiffel.com>
|
|||||||
LABEL description="EiffelWeb debug example hosted using apache2+libfcgi"
|
LABEL description="EiffelWeb debug example hosted using apache2+libfcgi"
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get -y install curl bzip2 make gcc \
|
&& apt-get -y install --no-install-recommends \
|
||||||
&& apt-get -y install apache2 libapache2-mod-fcgid libfcgi-dev \
|
curl bzip2 make gcc git-core \
|
||||||
&& apt-get -y install tmux git-all vim \
|
apache2 libapache2-mod-fcgid libfcgi-dev \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
|
#RUN apt-get update && apt-get -y install tmux git-all vim && rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
EXPOSE 80
|
EXPOSE 80
|
||||||
|
|
||||||
RUN a2enmod rewrite suexec include fcgid
|
RUN a2enmod rewrite suexec include fcgid
|
||||||
@@ -28,18 +30,18 @@ WORKDIR $HOME
|
|||||||
RUN mkdir $WEBDIR
|
RUN mkdir $WEBDIR
|
||||||
|
|
||||||
#Build the debug EiffelWeb example and copy the executable to $HOME/
|
#Build the debug EiffelWeb example and copy the executable to $HOME/
|
||||||
COPY files/build_debug_fcgi $HOME/build_debug_fcgi
|
COPY files/build_service_fcgi $HOME/build_service_fcgi
|
||||||
USER root
|
USER root
|
||||||
RUN chown eifweb:eifweb $HOME/build_debug_fcgi && chmod 700 $HOME/build_debug_fcgi
|
RUN chown eifweb:eifweb $HOME/build_service_fcgi && chmod 700 $HOME/build_service_fcgi
|
||||||
USER eifweb
|
USER eifweb
|
||||||
RUN $HOME/build_debug_fcgi $HOME/www
|
RUN $HOME/build_service_fcgi $HOME/www
|
||||||
|
|
||||||
USER root
|
USER root
|
||||||
COPY ./files/httpd.conf /etc/apache2/sites-enabled/000-default.conf
|
COPY ./files/httpd.conf /etc/apache2/sites-enabled/000-default.conf
|
||||||
COPY ./files/html/.htaccess $WEBDIR/html/.htaccess
|
COPY ./files/html/.htaccess $WEBDIR/html/.htaccess
|
||||||
COPY ./files/html/index.html $WEBDIR/html/index.html
|
COPY ./files/html/index.html $WEBDIR/html/index.html
|
||||||
RUN echo > $WEBDIR/html/service.ews
|
RUN echo > $WEBDIR/html/service.ews
|
||||||
RUN chown www-data:www-data -R $WEBDIR && chmod 400 $WEBDIR/html/*
|
RUN chown www-data:www-data -R $WEBDIR
|
||||||
|
|
||||||
#Setup apache as foreground (for docker purpose)
|
#Setup apache as foreground (for docker purpose)
|
||||||
RUN mkdir /etc/service/apache
|
RUN mkdir /etc/service/apache
|
||||||
|
|||||||
@@ -12,7 +12,7 @@ To build the docker image:
|
|||||||
|
|
||||||
To run the docker image in a self-destroyed container:
|
To run the docker image in a self-destroyed container:
|
||||||
```
|
```
|
||||||
docker run --rm -it -p 8080:80 --name my-ewf-debug local/ewf-debug-httpd
|
docker run --rm -dit -p 8080:80 --name my-ewf-debug local/ewf-debug-httpd
|
||||||
```
|
```
|
||||||
|
|
||||||
Notes:
|
Notes:
|
||||||
|
|||||||
@@ -16,7 +16,7 @@ source $HOME/eiffel.rc
|
|||||||
git clone https://github.com/EiffelWebFramework/EWF.git $web_dir/src
|
git clone https://github.com/EiffelWebFramework/EWF.git $web_dir/src
|
||||||
|
|
||||||
# Build executable
|
# Build executable
|
||||||
eiffel build -v --target debug_libfcgi $web_dir/src/examples/debug/debug.ecf $web_dir/bin/debug.fcgi
|
eiffel build -v --target debug_libfcgi $web_dir/src/examples/debug/debug.ecf $web_dir/html/debug.fcgi
|
||||||
|
|
||||||
# Clean files
|
# Clean files
|
||||||
rm -rf $ISE_EIFFEL
|
rm -rf $ISE_EIFFEL
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
<IfModule mod_fcgid.c>
|
<IfModule mod_fcgid.c>
|
||||||
AddHandler fcgid-script .ews
|
AddHandler fcgid-script .ews
|
||||||
FcgidWrapper /home/eifweb/www/bin/debug.fcgi .ews
|
FcgidWrapper /home/eifweb/www/html/service.fcgi .ews
|
||||||
</IfModule>
|
</IfModule>
|
||||||
|
|
||||||
Options +ExecCGI +Includes +FollowSymLinks
|
Options +ExecCGI +Includes +FollowSymLinks
|
||||||
|
|||||||
Reference in New Issue
Block a user