forked from typetools/checker-framework
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Dockerfile-ubuntu-jdk17
51 lines (44 loc) · 1.7 KB
/
Dockerfile-ubuntu-jdk17
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
# Create a Docker image that is ready to run the main Checker Framework tests,
# using JDK 17.
# "ubuntu" is the latest LTS release. "ubuntu:rolling" is the latest release.
FROM ubuntu
MAINTAINER Michael Ernst <mernst@cs.washington.edu>
# According to
# https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/:
# * Put "apt-get update" and "apt-get install" and apt cleanup in the same RUN command.
# * Do not run "apt-get upgrade"; instead get upstream to update.
# Instructions for installing Java 17 on Ubuntu:
# https://www.linuxuprising.com/2021/09/how-to-install-oracle-java-17-lts-on.html
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get -qqy update \
&& apt-get -qqy install software-properties-common \
&& add-apt-repository ppa:linuxuprising/java
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get -qqy update \
&& echo oracle-java17-installer shared/accepted-oracle-license-v1-3 select true | /usr/bin/debconf-set-selections \
&& echo oracle-java17-installer shared/accepted-oracle-licence-v1-3 boolean true | /usr/bin/debconf-set-selections \
&& apt-get -qqy install \
oracle-java17-installer --install-recommends
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get -qqy update \
&& apt-get -qqy install \
ant \
cpp \
git \
gradle \
jq \
libcurl3-gnutls \
make \
maven \
mercurial \
python3-pip \
python3-requests \
unzip \
wget
RUN export DEBIAN_FRONTEND=noninteractive \
&& wget https://mirrors.sonic.net/apache/maven/maven-3/3.8.3/binaries/apache-maven-3.8.3-bin.tar.gz \
&& tar xzvf apache-maven-3.8.3-bin.tar.gz
ENV PATH="/apache-maven-3.8.3/bin:$PATH"
RUN export DEBIAN_FRONTEND=noninteractive \
&& apt-get clean \
&& rm -rf /var/lib/apt/lists/*