build on PRs; nitpicks
[plcapi.git] / tests / ci / Dockerfile
index a604020..d8c4443 100644 (file)
@@ -1,29 +1,29 @@
-ARG UBUNTU_VERSION=xenial
+ARG UBUNTU_VERSION=bionic
 
 FROM ubuntu:${UBUNTU_VERSION}
 
 ARG PHP_VERSION=default
 
-RUN mkdir -p /usr/share/man/man1 && \
-      apt-get update
-
 COPY setup/*.sh /root/setup/
 COPY config/* /root/config/
 
-RUN chmod 755 /root/setup/*.sh && \
+RUN mkdir -p /usr/share/man/man1 && \
+  apt-get update && DEBIAN_FRONTEND=noninteractive apt-get -y upgrade && \
+  chmod 755 /root/setup/*.sh && \
   cd /root/setup && \
   ./install_packages.sh && \
   ./create_user.sh && \
   ./setup_apache.sh && \
   ./setup_privoxy.sh && \
   ./setup_php.sh "${PHP_VERSION}" && \
-  apt-get remove -y composer || echo An error on the line above is ok; ./get_composer.sh && mv /usr/local/bin/composer.phar /usr/local/bin/composer && chmod 755 /usr/local/bin/composer
+  ./setup_composer.sh
 
 COPY docker/entrypoint.sh /root/entrypoint.sh
 RUN chmod 755 /root/entrypoint.sh
 
 EXPOSE 80 443 8080
 
-WORKDIR /home/test
+# @todo can we avoid hardcoding this here? We can f.e. get it passed down as ARG...
+WORKDIR /home/docker/build
 
 ENTRYPOINT ["/root/entrypoint.sh"]