apparently I need to do this myself
This commit is contained in:
88
Dockerfile
88
Dockerfile
@@ -5,78 +5,78 @@ ENV DEBIAN_FRONTEND=noninteractive
|
|||||||
|
|
||||||
# Update and install Swiss Army Knife tools
|
# Update and install Swiss Army Knife tools
|
||||||
RUN apt-get update && apt-get install -y \
|
RUN apt-get update && apt-get install -y \
|
||||||
curl \
|
curl \
|
||||||
wget \
|
wget \
|
||||||
git \
|
git \
|
||||||
jq \
|
jq \
|
||||||
unzip \
|
unzip \
|
||||||
tar \
|
tar \
|
||||||
vim \
|
vim \
|
||||||
nano \
|
nano \
|
||||||
python3 \
|
python3 \
|
||||||
python3-pip \
|
python3-pip \
|
||||||
python3-venv \
|
python3-venv \
|
||||||
build-essential \
|
build-essential \
|
||||||
iputils-ping \
|
iputils-ping \
|
||||||
dnsutils \
|
dnsutils \
|
||||||
net-tools \
|
net-tools \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
openssh-server \
|
openssh-server \
|
||||||
ripgrep ncdu \
|
ripgrep ncdu \
|
||||||
sudo \
|
sudo \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install Node.js 22 (via NodeSource)
|
# Install Node.js 22 (via NodeSource)
|
||||||
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
RUN curl -fsSL https://deb.nodesource.com/setup_22.x | bash - \
|
||||||
&& apt-get install -y nodejs \
|
&& apt-get install -y nodejs \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install Chromium + Xvfb for headful browser support
|
# Install Chromium + Xvfb for headful browser support
|
||||||
RUN apt-get update && apt-get install -y chromium xvfb \
|
RUN apt-get update && apt-get install -y chromium xvfb \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
# Install OpenClaw CLI globally
|
# Install OpenClaw CLI globally
|
||||||
RUN npm install -g openclaw@latest
|
RUN npm install -g openclaw@latest
|
||||||
|
|
||||||
# Install yq (binary release for latest version)
|
# Install yq (binary release for latest version)
|
||||||
RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && \
|
RUN wget https://github.com/mikefarah/yq/releases/latest/download/yq_linux_amd64 -O /usr/bin/yq && \
|
||||||
chmod +x /usr/bin/yq
|
chmod +x /usr/bin/yq
|
||||||
RUN wget https://downloads-openshift-console.apps.lab.apilab.us/amd64/linux/oc.tar -O /tmp/oc.tar && \
|
RUN wget https://downloads-openshift-console.apps.lab.apilab.us/amd64/linux/oc.tar -O /tmp/oc.tar && \
|
||||||
tar -xvf /tmp/oc.tar -C /usr/bin/ && \
|
tar -xvf /tmp/oc.tar -C /usr/bin/ && \
|
||||||
rm /tmp/oc.tar && chmod +x /usr/bin/oc
|
rm /tmp/oc.tar && chmod +x /usr/bin/oc
|
||||||
|
|
||||||
# Setup SSH directory & Config for OpenShift (Random UID support)
|
# Setup SSH directory & Config for OpenShift (Random UID support)
|
||||||
RUN mkdir -p /var/run/sshd && \
|
RUN mkdir -p /var/run/sshd && \
|
||||||
chmod 775 /var/run/sshd
|
chmod 775 /var/run/sshd
|
||||||
|
|
||||||
# Custom sshd_config for non-root usage
|
# Custom sshd_config for non-root usage
|
||||||
# StrictModes no: Required for non-root / random UID environments
|
# StrictModes no: Required for non-root / random UID environments
|
||||||
# PidFile: Point to /tmp for guaranteed write access
|
# PidFile: Point to /tmp for guaranteed write access
|
||||||
RUN echo "Port 2222
|
RUN echo "Port 2222 \
|
||||||
PermitRootLogin no
|
PermitRootLogin no \
|
||||||
PasswordAuthentication no
|
PasswordAuthentication no \
|
||||||
PubkeyAuthentication yes
|
PubkeyAuthentication yes \
|
||||||
StrictModes no
|
StrictModes no \
|
||||||
PidFile /tmp/sshd.pid
|
PidFile /tmp/sshd.pid \
|
||||||
HostKey /data/ssh/ssh_host_rsa_key
|
HostKey /data/ssh/ssh_host_rsa_key \
|
||||||
HostKey /data/ssh/ssh_host_ecdsa_key
|
HostKey /data/ssh/ssh_host_ecdsa_key \
|
||||||
HostKey /data/ssh/ssh_host_ed25519_key
|
HostKey /data/ssh/ssh_host_ed25519_key \
|
||||||
AuthorizedKeysFile .ssh/authorized_keys
|
AuthorizedKeysFile .ssh/authorized_keys \
|
||||||
ChallengeResponseAuthentication no
|
ChallengeResponseAuthentication no \
|
||||||
UsePAM yes
|
UsePAM yes \
|
||||||
Subsystem sftp /usr/lib/openssh/sftp-server" > /etc/ssh/sshd_config
|
Subsystem sftp /usr/lib/openssh/sftp-server" > /etc/ssh/sshd_config
|
||||||
|
|
||||||
# Create a user 'claw' (UID 1000) with sudo access
|
# Create a user 'claw' (UID 1000) with sudo access
|
||||||
RUN useradd -m -s /bin/bash -u 1000 claw && \
|
RUN useradd -m -s /bin/bash -u 1000 claw && \
|
||||||
echo "claw ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
echo "claw ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers && \
|
||||||
chmod -R g+rwX /home/claw
|
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 && \
|
RUN mkdir -p /data && \
|
||||||
chown claw:claw /data && \
|
chown claw:claw /data && \
|
||||||
chmod 775 /data
|
chmod 775 /data
|
||||||
|
|
||||||
# Set working directory to the persistent volume
|
# Set working directory to the persistent volume
|
||||||
WORKDIR /data
|
WORKDIR /data
|
||||||
|
|||||||
Reference in New Issue
Block a user