Dockerfile.rocky8 #1

  • //
  • p4-sdp/
  • dev_rebrand/
  • test/
  • docker/
  • Dockerfile.rocky8
  • View
  • Commits
  • Open Download .zip Download (2 KB)
FROM rockylinux/rockylinux:8-ubi-init as rocky8-base
LABEL maintainer="Robert Cowham <[email protected]>"

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 wget; \
    dnf install -y vim

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 ''

# ====================================================
FROM rocky8-base as rocky8-sdp
LABEL maintainer="Robert Cowham <[email protected]>"

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
RUN 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.rhel8.repo /tmp
RUN sudo rpm --import https://package.perforce.com/perforce.pubkey
RUN sudo cp -f /tmp/perforce.rhel8.repo /etc/yum.repos.d/perforce.repo

RUN bash -lc 'curl -LsSf https://astral.sh/uv/install.sh | sh && \
    export PATH="$HOME/.local/bin:$PATH" && \
    uv python install 3.14 && \
    uv venv --python 3.14 "$HOME/.venv" && \
    . "$HOME/.venv/bin/activate" && \
    uv pip install pytest-testinfra p4python'

USER root
CMD ["/sbin/init"]
# Change User Description Committed
#1 33407 Claude (AI Agent by Anthropic) Merge Down from //p4-sdp/dev into //p4-sdp/dev_rebrand, ahead of
Copy Up (dev_rebrand -> dev -> main) for the first Streams-native release.

8 files needed real resolve attention (out of the full pending set --
everything else was a clean auto-merge). Reviewed each individually
rather than blanket-accepting one side, per the Merge Down/Copy Up
philosophy (Copy Up later will be a forced blast-replace; this step is
where we're selective and must not lose anything real):

- Server/test/test_SDP.py: accept yours (dev_rebrand). Every difference
  was pre-rebrand naming (hxdepots/helix_binaries/etc.) that dev's copy
  predates; dev_rebrand's rebranded content is a strict superset.
- Server/test/test_Upgrade.py: manual merge, not a single-side accept.
  Kept dev_rebrand's rebranded naming, its '-Ov' flag (still needed --
  dev_rebrand's own Version file is a stale placeholder that trips
  upgrade.sh's real version-mismatch safety check unless overridden, see
  change 33294), and its testUpgradeSBDLowSecurityAborts method (this
  session's SDP-1350 test, absent from dev entirely -- would have been
  silently deleted by a naive accept-theirs). Adopted dev's two
  timeout=60->120 bumps in testUpgrade (change 33269, a real flakiness
  fix), which dev_rebrand had never picked up.
- test/docker/Dockerfile.rocky8 (new)/.base/.sdp (deleted): accept
  theirs. dev_rebrand's old split .base/.sdp files were untouched since a
  2025-07-14 stream-conversion branch operation -- no rebranding content,
  nothing at risk. Robert Cowham's newer consolidated, uv-based
  Dockerfile.rocky8 in dev is a clean improvement, matching the same
  pattern already established for Dockerfile.rocky9.
- test/docker/Dockerfile.rocky9: accept theirs. Only difference was one
  harmless, already-commented-out line.
- test/docker/files/test_sdp.sh: accept yours (dev_rebrand), content and
  filetype. Every difference was rebranding (paths, and the exact
  swarm.workshop.perforce.com -> workshop.perforce.com URL fix from this
  session's own SDP-1379 sweep) plus a partial Version ID Block dev
  entirely lacks.
- test/run_docker_tests.sh: accept theirs (dev), content and filetype.
  dev has a complete, working Version ID Block (matching the SDP-1161
  standard this session established, which this particular test-infra
  file had been missed by) plus a real functional improvement -- using
  $VersionStream to make podman container/image names unique per-stream,
  avoiding Jenkins collisions between concurrent stream builds
  (Robert Cowham, change 33303). Confirmed nothing unique to dev_rebrand's
  version was lost.

Everything else integrated cleanly with no manual intervention needed.
//p4-sdp/dev/test/docker/Dockerfile.rocky8
#1 33301 Robert Cowham Refactor to combine rocky 8 dockerfiles