Updated container files.

This commit is contained in:
2018-04-24 15:13:47 +02:00
parent 207a109e44
commit cf2f0f09fa
4 changed files with 13 additions and 11 deletions

View File

@@ -4,11 +4,13 @@ MAINTAINER Jocelyn Fiat <jfiat@eiffel.com>
LABEL description="EiffelWeb debug example hosted using apache2+libfcgi"
RUN apt-get update \
&& apt-get -y install curl bzip2 make gcc \
&& apt-get -y install apache2 libapache2-mod-fcgid libfcgi-dev \
&& apt-get -y install tmux git-all vim \
&& apt-get -y install --no-install-recommends \
curl bzip2 make gcc git-core \
apache2 libapache2-mod-fcgid libfcgi-dev \
&& 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
RUN a2enmod rewrite suexec include fcgid
@@ -28,18 +30,18 @@ WORKDIR $HOME
RUN mkdir $WEBDIR
#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
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
RUN $HOME/build_debug_fcgi $HOME/www
RUN $HOME/build_service_fcgi $HOME/www
USER root
COPY ./files/httpd.conf /etc/apache2/sites-enabled/000-default.conf
COPY ./files/html/.htaccess $WEBDIR/html/.htaccess
COPY ./files/html/index.html $WEBDIR/html/index.html
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)
RUN mkdir /etc/service/apache

View File

@@ -12,7 +12,7 @@ To build the docker image:
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:

View File

@@ -16,7 +16,7 @@ source $HOME/eiffel.rc
git clone https://github.com/EiffelWebFramework/EWF.git $web_dir/src
# 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
rm -rf $ISE_EIFFEL

View File

@@ -1,6 +1,6 @@
<IfModule mod_fcgid.c>
AddHandler fcgid-script .ews
FcgidWrapper /home/eifweb/www/bin/debug.fcgi .ews
FcgidWrapper /home/eifweb/www/html/service.fcgi .ews
</IfModule>
Options +ExecCGI +Includes +FollowSymLinks