Fix syntax error: move comments outside RUN command chain
This commit is contained in:
@@ -18,14 +18,14 @@ RUN echo "Port 2222\nPermitRootLogin no\nPasswordAuthentication no\nPubkeyAuthen
|
||||
# Create a user 'claw' with sudo access
|
||||
# Passwordless sudo allowed for friction-free automation
|
||||
# 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
|
||||
chmod -R g+rwX /home/claw
|
||||
# We also chmod the home dir to allow group access (OpenShift random UID runs as root group)
|
||||
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
|
||||
# Mount persistent storage here
|
||||
VOLUME /data
|
||||
RUN mkdir -p /data && chown claw:claw /data && # Critical for OpenShift: Allow root group (gid 0) to write to /data
|
||||
chmod 775 /data
|
||||
# Critical for OpenShift: Allow root group (gid 0) to write to /data
|
||||
RUN mkdir -p /data && chown claw:claw /data && chmod 775 /data
|
||||
|
||||
# Set working directory to the persistent volume
|
||||
WORKDIR /data
|
||||
|
||||
Reference in New Issue
Block a user