| |
| |
| |
| |
| |
| |
|
|
| FROM node:22-slim |
|
|
| |
| |
| RUN apt-get update && apt-get install -y --no-install-recommends \ |
| python3 make g++ \ |
| git curl bash gosu ca-certificates openssh-client \ |
| |
| libglib2.0-0 libnss3 libnspr4 libdbus-1-3 libatk1.0-0 libatk-bridge2.0-0 \ |
| libcups2 libdrm2 libxkbcommon0 libatspi2.0-0 libxcomposite1 libxdamage1 \ |
| libxfixes3 libxrandr2 libgbm1 libasound2 libpango-1.0-0 libcairo2 \ |
| libx11-6 libx11-xcb1 libxcb1 libxext6 libxrender1 libxss1 libxtst6 \ |
| libxshmfence1 libgtk-3-0 libexpat1 libfontconfig1 fonts-liberation \ |
| xdg-utils libpangocairo-1.0-0 libpangoft2-1.0-0 libu2f-udev libvulkan1 \ |
| && GH_VERSION="2.63.2" \ |
| && ARCH=$(uname -m) \ |
| && case "$ARCH" in \ |
| x86_64) GH_ARCH="amd64" ;; \ |
| aarch64|arm64) GH_ARCH="arm64" ;; \ |
| *) echo "Unsupported architecture: $ARCH" && exit 1 ;; \ |
| esac \ |
| && curl -L "https://github.com/cli/cli/releases/download/v${GH_VERSION}/gh_${GH_VERSION}_linux_${GH_ARCH}.tar.gz" -o gh.tar.gz \ |
| && tar -xzf gh.tar.gz \ |
| && mv gh_${GH_VERSION}_linux_${GH_ARCH}/bin/gh /usr/local/bin/gh \ |
| && rm -rf gh.tar.gz gh_${GH_VERSION}_linux_${GH_ARCH} \ |
| && rm -rf /var/lib/apt/lists/* |
|
|
| |
| RUN npm install -g @anthropic-ai/claude-code |
|
|
| |
| |
| ARG UID=1001 |
| ARG GID=1001 |
|
|
| |
| |
| RUN groupadd -o -g ${GID} automaker && \ |
| useradd -o -u ${UID} -g automaker -m -d /home/automaker -s /bin/bash automaker && \ |
| mkdir -p /home/automaker/.local/bin && \ |
| mkdir -p /home/automaker/.cursor && \ |
| chown -R automaker:automaker /home/automaker && \ |
| chmod 700 /home/automaker/.cursor |
|
|
| |
| USER automaker |
| ENV HOME=/home/automaker |
| RUN curl https://cursor.com/install -fsS | bash || true |
| USER root |
| |
| |
| RUN mkdir -p /etc/profile.d && \ |
| echo 'export PATH="/home/automaker/.local/bin:$PATH"' > /etc/profile.d/cursor-cli.sh && \ |
| chmod +x /etc/profile.d/cursor-cli.sh |
| |
| |
| RUN echo 'export PATH="/home/automaker/.local/bin:$PATH"' >> /home/automaker/.bashrc && \ |
| chown automaker:automaker /home/automaker/.bashrc |
| RUN echo 'export PATH="/home/automaker/.local/bin:$PATH"' >> /root/.bashrc |
| |
| WORKDIR /app |
| |
| |
| RUN mkdir -p /data /projects && chown automaker:automaker /data /projects |
| |
| |
| RUN git config --system --add safe.directory '*' && \ |
| git config --system credential.helper '!gh auth git-credential' |
| |
| |
| COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh |
| RUN chmod +x /usr/local/bin/docker-entrypoint.sh |
| |
| |
| ENV PORT=3008 |
| ENV DATA_DIR=/data |
| ENV HOME=/home/automaker |
| ENV PATH="/home/automaker/.local/bin:${PATH}" |
| |
| |
| EXPOSE 3007 3008 |
| |
| |
| ENTRYPOINT ["/usr/local/bin/docker-entrypoint.sh"] |
| |
| |
| CMD ["npm", "run", "dev:web"] |
| |