Dockerfile.rocky9 #1

  • //
  • guest/
  • perforce_software/
  • sdp/
  • main/
  • test/
  • docker/
  • Dockerfile.rocky9
  • View
  • Commits
  • Open Download .zip Download (2 KB)
FROM rockylinux/rockylinux:9-ubi-init as rocky9-base
MAINTAINER Robert Cowham "rcowham@perforce.com"

RUN dnf update -y; \
    dnf install -y bc; \
    dnf install -y cronie; \
    dnf install -y curl; \
    dnf install -y diffutils; \
    dnf install -y file; \
    dnf install -y findutils; \
    dnf install -y perl; \
    dnf install -y procps-ng; \
    dnf install -y rsync; \
    dnf install -y sudo; \
    dnf install -y tar; \
    dnf install -y which; \
    dnf install -y hostname; \
    dnf install -y wget

RUN dnf install -y openssh-server openssh-clients passwd; \
    dnf clean all; \
    ssh-keygen -t rsa -f /etc/ssh/ssh_host_rsa_key -N ''; \
    ssh-keygen -t dsa -f /etc/ssh/ssh_host_dsa_key -N ''

# Some tools needed for testing or useful for interactive test inspection.
RUN dnf install -y vim

# ====================================================

FROM rocky9-base as rocky9-sdp
MAINTAINER Robert Cowham "rcowham@perforce.com"

ADD setup_container.sh /tmp
RUN /bin/bash -x /tmp/setup_container.sh

ADD insecure_ssh_key.pub /tmp
ADD insecure_ssh_key /tmp
ADD setup_ssh.sh /tmp

RUN /bin/bash -x /tmp/setup_ssh.sh

# For SSH
EXPOSE 22

RUN echo "Setting default memory limit..." && \
  sh -c 'echo memory.limit=2048m >> /etc/systemd/system.conf'

# Recommend resource allocation at runtime
CMD ["echo", "For optimal performance, consider running the container with --cpus=2 --memory=2g --storage-opt size=20G"]

USER perforce
ADD files/reset_sdp.sh /p4/
ADD files/docker_entry.sh /p4/
ADD files/test_sdp.sh /p4/
ADD files/test_mkrep.sh /p4/

# From package.perforce.com:
ADD files/perforce.rhel9.repo /tmp
RUN sudo rpm --import https://package.perforce.com/perforce.pubkey
RUN sudo cp -f /tmp/perforce.rhel9.repo /etc/yum.repos.d/perforce.repo

USER root
# Allow for ARM as well as AMD architecture
RUN yum install -y python3-pip; \
    pip3 install p4python

# CMD ["/p4/docker_entry.sh"]
CMD ["/sbin/init"]
# Change User Description Committed
#1 30915 C. Thomas Tyler Released SDP 2024.1.30913 (2024/11/20).
Copy Up using 'p4 copy -r -b perforce_software-sdp-dev'.
//guest/perforce_software/sdp/dev/test/docker/Dockerfile.rocky9
#2 30879 Robert Cowham Update tests to use systemctl (remove hack) and fix some env problems.
#1 30845 Robert Cowham Base the podman/docker image on rocky9-ubi-init to get systemd
This supports systemd within the container if run under podman instead of docker
Remove centos7 docker files