| FROM ubuntu:22.04 |
|
|
| ENV DEBIAN_FRONTEND=noninteractive |
| ENV HOME=/home/user |
| ENV USER=user |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| curl wget git nano vim htop tmux tree zip unzip xz-utils \ |
| jq netcat-openbsd procps ca-certificates gnupg2 \ |
| software-properties-common build-essential python3 python3-pip \ |
| sudo locales \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN locale-gen en_US.UTF-8 |
| ENV LANG=en_US.UTF-8 LC_ALL=en_US.UTF-8 |
|
|
| |
| RUN useradd -m -u 1000 -s /bin/bash user && \ |
| echo "user ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers |
|
|
| |
| RUN TTYD_VERSION=$(curl -s https://api.github.com/repos/tsl0922/ttyd/releases/latest | jq -r .tag_name) && \ |
| wget -q "https://github.com/tsl0922/ttyd/releases/download/${TTYD_VERSION}/ttyd.x86_64" -O /usr/local/bin/ttyd && \ |
| chmod +x /usr/local/bin/ttyd |
|
|
| |
| RUN CS_VERSION=$(curl -s https://api.github.com/repos/coder/code-server/releases/latest | jq -r .tag_name | sed 's/^v//') && \ |
| wget -q "https://github.com/coder/code-server/releases/download/v${CS_VERSION}/code-server_${CS_VERSION}_amd64.deb" -O /tmp/code-server.deb && \ |
| dpkg -i /tmp/code-server.deb && \ |
| rm /tmp/code-server.deb |
|
|
| |
| RUN FB_VERSION=$(curl -s https://api.github.com/repos/filebrowser/filebrowser/releases/latest | jq -r .tag_name) && \ |
| wget -q "https://github.com/filebrowser/filebrowser/releases/download/${FB_VERSION}/linux-amd64-filebrowser.tar.gz" -O /tmp/fb.tar.gz && \ |
| tar -xzf /tmp/fb.tar.gz -C /usr/local/bin/ && \ |
| chmod +x /usr/local/bin/filebrowser && \ |
| rm /tmp/fb.tar.gz |
|
|
| |
| RUN curl -fsSL https://deb.nodesource.com/setup_20.x | bash - && \ |
| apt-get install -y --no-install-recommends nodejs && \ |
| rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN apt-get update && apt-get install -y --no-install-recommends nginx && \ |
| rm -rf /var/lib/apt/lists/* |
|
|
| |
| |
|
|
| |
| COPY app/ /app/ |
| RUN cp /app/nginx/nginx.conf /etc/nginx/nginx.conf |
| RUN chmod +x /app/scripts/*.sh /app/entrypoint.sh |
|
|
| |
| WORKDIR /app/dashboard |
| RUN npm install --production |
|
|
| |
| RUN mkdir -p /data/{.openclaw,workspaces,sessions,logs,.filebrowser,.vscode-data,.vscode-extensions} && \ |
| mkdir -p /data/workspaces/default && \ |
| chown -R user:user /data /app /home/user |
|
|
| |
| RUN mkdir -p /var/run /var/log/nginx /var/lib/nginx /var/cache/nginx && \ |
| touch /var/run/nginx.pid && \ |
| chown -R user:user /var/log/nginx /var/lib/nginx /var/cache/nginx /var/run/nginx.pid |
|
|
| |
| EXPOSE 7860 |
|
|
| |
| HEALTHCHECK --interval=30s --timeout=10s --start-period=30s --retries=3 \ |
| CMD nc -z 127.0.0.1 7860 || exit 1 |
|
|
| |
| ENTRYPOINT ["/app/entrypoint.sh"] |
|
|