diff --git a/docker/apache.Dockerfile b/docker/apache.Dockerfile index 95dfd2f..709dafd 100644 --- a/docker/apache.Dockerfile +++ b/docker/apache.Dockerfile @@ -8,9 +8,10 @@ WORKDIR /var/www RUN apt-get update && apt-get install -y build-essential wget +COPY ./docker/deps/openssl-1.0.2q.tar.gz . + #Setting up weak ciphers -RUN wget https://www.openssl.org/source/openssl-1.0.2q.tar.gz \ - && tar xzvf openssl-1.0.2q.tar.gz \ +RUN tar xzvf openssl-1.0.2q.tar.gz \ && cd openssl-1.0.2q \ && ./config --prefix=/opt/openssl-1.0.2 \ --openssldir=/etc/ssl \ @@ -21,6 +22,8 @@ RUN wget https://www.openssl.org/source/openssl-1.0.2q.tar.gz \ && make \ && make install +RUN rm openssl-1.0.2q.tar.gz && rm -rf openssl-1.0.2q + COPY ./docker/vars/apache/arm-linux-gnueabihf.conf /etc/ld.so.conf.d/arm-linux-gnueabihf.conf RUN ldconfig @@ -35,10 +38,11 @@ RUN apt-get install -y libpcre3 \ libxslt1-dev \ libxslt1.1 -RUN wget https://dlcdn.apache.org/httpd/httpd-2.4.61.tar.gz \ - && wget https://downloads.apache.org/apr/apr-1.6.5.tar.gz \ - && wget https://downloads.apache.org/apr/apr-util-1.6.3.tar.gz \ - && tar xzvf httpd-2.4.61.tar.gz \ +COPY ./docker/deps/httpd-2.4.61.tar.gz . +COPY ./docker/deps/apr-1.6.5.tar.gz . +COPY ./docker/deps/apr-util-1.6.3.tar.gz . + +RUN tar xzvf httpd-2.4.61.tar.gz \ && cd httpd-2.4.61/srclib/ \ && tar xzvf ../../apr-1.6.5.tar.gz \ && tar xzvf ../../apr-util-1.6.3.tar.gz \ @@ -53,6 +57,10 @@ RUN wget https://dlcdn.apache.org/httpd/httpd-2.4.61.tar.gz \ && make install \ && apt-get install -y php libapache2-mod-php7.4 +RUN rm httpd-2.4.61.tar.gz && rm -rf httpd-2.4.61 \ + && rm apr-1.6.5.tar.gz && rm -rf apr-1.6.5 \ + && rm apr-util-1.6.3.tar.gz && rm -rf apr-util-1.6.3 + COPY --chown=0:0 ./docker/vars/apache/etc /etc/dnas COPY --chown=www-data:www-data ./docker/vars/php/www /var/www diff --git a/docker/deps/openssl-1.0.2q.tar.gz b/docker/deps/openssl-1.0.2q.tar.gz new file mode 100644 index 0000000..26ca001 Binary files /dev/null and b/docker/deps/openssl-1.0.2q.tar.gz differ diff --git a/docker/server.Dockerfile b/docker/server.Dockerfile index b540c2f..9beb305 100644 --- a/docker/server.Dockerfile +++ b/docker/server.Dockerfile @@ -3,10 +3,13 @@ FROM openjdk:17.0.2-jdk-slim-bullseye ARG SERVER_PATH ARG RUN_FILE_PATH -RUN apt-get update && apt-get install -y wget +RUN apt-get update -RUN wget https://dev.mysql.com/get/Downloads/Connector-J/mysql-connector-j_8.0.32-1debian11_all.deb \ - && dpkg --install mysql-connector-j_8.0.32-1debian11_all.deb +COPY ./docker/deps/mysql-connector-j_8.0.32-1debian11_all.deb . + +RUN dpkg --install mysql-connector-j_8.0.32-1debian11_all.deb + +RUN rm mysql-connector-j_8.0.32-1debian11_all.deb COPY --chown=www-data:www-data $SERVER_PATH /var/www/bioserver COPY --chown=www-data:www-data --chmod=754 $RUN_FILE_PATH /var/www/run.sh @@ -18,7 +21,7 @@ RUN javac -cp /usr/share/java/mysql-connector-j-8.0.32.jar:. ./bioserver/*.java RUN mkdir -p bin/bioserver \ && mv bioserver/*.class bin/bioserver \ && mkdir lib \ - && cp /usr/share/java/mysql-connector-j-8.0.32.jar lib/mysql-connector.jar + && cp /usr/share/java/mysql-connector-j-8.0.32.jar lib/mysql-connector.jar RUN apt-get install -y lsof iputils-ping