这里的全部故事是,我想使用 AWS Codebuild 来编译 Java10 + JavaFX 应用程序。
因此,我从打开的JDK中创建了一个docker镜像。 Here是。
但是看起来它不包含JavaFX。
所以我也通过添加来安装
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y openjfx
但是尝试构建时仍然出现错误
error: module not found: javafx.controls
requires javafx.controls;
如果我这样做
java --list-modules
javafx不显示..任何指针将不胜感激!
!!更新!!
所以我有一个dockerfile可以工作。
FROM ubuntu:14.04.5
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y software-properties-common python-software-properties
RUN add-apt-repository ppa:linuxuprising/java
RUN apt-get update
RUN apt-get install -y libx11-6
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | \
debconf-set-selections
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | \
debconf-set-selections
RUN apt-get install -y oracle-java10-installer
RUN apt-get update
RUN apt-get upgrade -y
最佳答案
所以这已经运行了一段时间了,看起来还可以...所以我想我可以关闭Q了。
FROM ubuntu:14.04.5
RUN apt-get update
RUN apt-get upgrade -y
RUN apt-get install -y software-properties-common python-software-properties
RUN add-apt-repository ppa:linuxuprising/java
RUN apt-get update
RUN apt-get install -y libx11-6
RUN echo debconf shared/accepted-oracle-license-v1-1 select true | \
debconf-set-selections
RUN echo debconf shared/accepted-oracle-license-v1-1 seen true | \
debconf-set-selections
RUN apt-get install -y oracle-java10-installer
RUN apt-get update
RUN apt-get upgrade -y