Fix syntax error: move comments outside RUN command chain

This commit is contained in:
2026-02-02 02:35:38 +00:00
parent 4250ec3925
commit a0134a6cfc

View File

@@ -18,14 +18,14 @@ RUN echo "Port 2222\nPermitRootLogin no\nPasswordAuthentication no\nPubkeyAuthen
# Create a user 'claw' with sudo access # Create a user 'claw' with sudo access
# Passwordless sudo allowed for friction-free automation # Passwordless sudo allowed for friction-free automation
# OpenShift runs as random UID, but 'claw' gives us a named user for direct exec if needed # OpenShift runs as random UID, but 'claw' gives us a named user for direct exec if needed
RUN useradd -m -s /bin/bash claw && echo "claw ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && # Allow group (0) write access for OpenShift random UID # We also chmod the home dir to allow group access (OpenShift random UID runs as root group)
chmod -R g+rwX /home/claw RUN useradd -m -s /bin/bash claw && echo "claw ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && chmod -R g+rwX /home/claw
# Prepare volume mount point # Prepare volume mount point
# Mount persistent storage here # Mount persistent storage here
VOLUME /data VOLUME /data
RUN mkdir -p /data && chown claw:claw /data && # Critical for OpenShift: Allow root group (gid 0) to write to /data # Critical for OpenShift: Allow root group (gid 0) to write to /data
chmod 775 /data RUN mkdir -p /data && chown claw:claw /data && chmod 775 /data
# Set working directory to the persistent volume # Set working directory to the persistent volume
WORKDIR /data WORKDIR /data