diff --git a/Dockerfile b/Dockerfile index e5b1ef6..11b5be6 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,16 +1,14 @@ # Dockerfile for EPICS OPI PHoebus -# NOTE: I had to build this image with --network host. Otherwise -# the maven downloads are very slow. I am of the opinion this is an MTU -# mismatch between docker and host networks (requires investigation) - -##### shared environment stage ################################################# FROM ubuntu:20.04 + ENV DEBIAN_FRONTEND=noninteractive + RUN apt-get update && apt-get install -y locales RUN sed -i -e 's/# en_US.UTF-8 UTF-8/en_US.UTF-8 UTF-8/' /etc/locale.gen && \ dpkg-reconfigure --frontend=noninteractive locales && \ update-locale LANG=en_US.UTF-8 + ENV LANG en_US.UTF-8 RUN apt-get install -y \ openjdk-11-jdk \ @@ -20,11 +18,16 @@ RUN apt-get install -y \ ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64/ +WORKDIR / # get phoebus and dependencies -RUN git clone https://github.com/ControlSystemStudio/phoebus.git ${PHOEBUS_DIR} && \ - mvn clean verify -f dependencies/pom.xml \ - mvn clean install +RUN git clone https://github.com/ControlSystemStudio/phoebus.git +WORKDIR /phoebus +RUN mvn clean verify -f dependencies/pom.xml +# All but first run can use -o for offline +# +mvn -DskipTests clean install +# (cd phoebus-product/target; java -jar product-*-SNAPSHOT.jar --add-modules=ALL-SYSTEM ) RUN bash -c "ln -s phoebus-product/target/product-*-SNAPSHOT.jar product.jar" -ENTRYPOINT ["java", "-jar", "/phoebus/product.jar", "-server", "4918"] +ENTRYPOINT ["java", "-jar", "/phoebus/product.jar", "-server", "4918", "--add-modules=ALL-SYSTEM"]