|
@@ -52,27 +52,31 @@ RUN git clone --recursive https://github.com/CopernicaMarketingSoftware/PHP-CPP.
|
|
|
cp libphpcpp.so.* /usr/lib/ && make install
|
|
|
|
|
|
RUN git clone https://git-crysp.uwaterloo.ca/miti/Apache_PHP_extension.git && \
|
|
|
- cd Apache_PHP_extension && git checkout recreating_state_for_teeter && \
|
|
|
+ cd Apache_PHP_extension && git checkout recreating_state_for_teeter && \
|
|
|
make
|
|
|
|
|
|
-#WORKDIR /root/graphene/LibOS/shim/test/apps/apache
|
|
|
-#RUN cp /root/source/Apache_PHP_extension/apacheMakefile ./Makefile
|
|
|
-#RUN cp /root/source/Apache_PHP_extension/*.tar.gz ./
|
|
|
+WORKDIR /root/graphene/LibOS/shim/test/apps/apache
|
|
|
+RUN cp /root/source/Apache_PHP_extension/apacheMakefile ./Makefile
|
|
|
+RUN cp /root/source/Apache_PHP_extension/*.tar.gz ./
|
|
|
#Don't make the manifest yet - make the apache/php build first and then the manifest.
|
|
|
-#RUN make SGX=1 build-apache
|
|
|
+RUN make SGX=1 build-apache
|
|
|
|
|
|
#Add the updated httpd.manifest.template
|
|
|
-#RUN cp /root/source/Apache_PHP_extension/httpd.manifest.template ./
|
|
|
+RUN cp /root/source/Apache_PHP_extension/httpd.manifest.template ./
|
|
|
#Add the PHP .ini file from the PHP folder to /obj/lib
|
|
|
-#RUN cp ./php-7.0.7/php.ini-development ./obj/lib/php.ini
|
|
|
+RUN cp ./php-7.0.7/php.ini-development ./obj/lib/php.ini
|
|
|
#Add the extension to the obj/modules folder.
|
|
|
-#RUN cp /root/source/Apache_PHP_extension/localattestation_decryption.so ./obj/modules/
|
|
|
+RUN cp /root/source/Apache_PHP_extension/localattestation_decryption.so ./obj/modules/
|
|
|
#Add the extension directory and the extension name to the php.ini
|
|
|
-#RUN echo "extension_dir=/root/graphene/LibOS/shim/test/apps/apache/LibOS/shim/test/apps/apache/obj/modules" >> obj/lib/php.ini && \
|
|
|
-# echo "extension=localattestation_decryption.so" >> obj/lib/php.ini
|
|
|
+RUN echo "extension_dir=/root/graphene/LibOS/shim/test/apps/apache/obj/modules" >> obj/lib/php.ini && \
|
|
|
+ echo "extension=localattestation_decryption.so" >> obj/lib/php.ini
|
|
|
#Add all php source code files to the right place.
|
|
|
-#RUN cp /root/source/Apache_PHP_extension/*.php ./obj/htdocs
|
|
|
-#RUN make SGX=1
|
|
|
+RUN cp /root/source/Apache_PHP_extension/*.php ./obj/htdocs
|
|
|
+#Fix the configuration file for Apache
|
|
|
+RUN sed -i s/User/#User/g obj/conf/httpd.conf
|
|
|
+RUN sed -i s/Group/#Group/g obj/conf/httpd.conf
|
|
|
+RUN cat /root/source/Apache_PHP_extension/httpd.conf >> obj/conf/httpd.conf
|
|
|
+RUN make SGX=1
|
|
|
|
|
|
WORKDIR /root
|
|
|
COPY deploy_enclaves.sh ./
|