# DO NOT EDIT this file.  Edit Dockerfile-rockylinux.m4 instead.

# Create a Docker image that is ready to run the Daikon tests.

FROM rockylinux/rockylinux:10
LABEL org.opencontainers.image.authors="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" in the same RUN command.
#  * Do not run "apt-get upgrade"; instead get upstream to update.

# The EPEL repository contains certain packages.
RUN dnf -q -y upgrade && dnf -q -y install \
  epel-release

# curl is installed by default on Rocky Linux.
RUN dnf -q -y upgrade && dnf -q -y install \
  autoconf \
  automake \
  bc \
  binutils-devel \
  diffutils \
  findutils \
  gcc \
  git \
  jq \
  libxcrypt-devel \
  m4 \
  make \
  perl-English \
  perl-filetest \
  rsync \
  tar \
  unzip \
  wget \
  which

# Install the JDK.
RUN dnf -q -y upgrade && dnf -q -y install \
  java-21-openjdk \
  java-21-openjdk-devel

# Azure runs jobs as a non-root user, who must be able to read files in /root
# and run programs installed there.  Rocky Linux makes /root inaccessible to
# other users.  This step must follow every step that writes to /root.
RUN chmod -R og+rX /root

# Clean up.
RUN dnf -q clean all
