molecule-ai

workspace-template-claude-code (sha-7d2cc10)

Published 2026-07-09 11:28:34 +00:00 by pypi-publisher

Installation

docker pull git.moleculesai.app/molecule-ai/workspace-template-claude-code:sha-7d2cc10
sha256:6c23ccb795075019121512bba0f7739eb4eb01b580c290a74fea14cf57e4073d

About this package

Molecule AI workspace template — claude-code runtime

Image Layers

# debian.sh --arch 'amd64' out/ 'trixie' '@1782172800'
ENV PATH=/usr/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
ENV LANG=C.UTF-8
RUN /bin/sh -c set -eux; apt-get update; apt-get install -y --no-install-recommends ca-certificates netbase tzdata ; apt-get dist-clean # buildkit
ENV GPG_KEY=A035C8C19219BA821ECEA86B64E628F8D684696D
ENV PYTHON_VERSION=3.11.15
ENV PYTHON_SHA256=272179ddd9a2e41a0fc8e42e33dfbdca0b3711aa5abf372d3f2d51543d09b625
RUN /bin/sh -c set -eux; savedAptMark="$(apt-mark showmanual)"; apt-get update; apt-get install -y --no-install-recommends dpkg-dev gcc gnupg libbluetooth-dev libbz2-dev libc6-dev libdb-dev libffi-dev libgdbm-dev liblzma-dev libncursesw5-dev libreadline-dev libsqlite3-dev libssl-dev make tk-dev uuid-dev wget xz-utils zlib1g-dev ; wget -O python.tar.xz "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz"; echo "$PYTHON_SHA256 *python.tar.xz" | sha256sum -c -; wget -O python.tar.xz.asc "https://www.python.org/ftp/python/${PYTHON_VERSION%%[a-z]*}/Python-$PYTHON_VERSION.tar.xz.asc"; GNUPGHOME="$(mktemp -d)"; export GNUPGHOME; gpg --batch --keyserver hkps://keys.openpgp.org --recv-keys "$GPG_KEY"; gpg --batch --verify python.tar.xz.asc python.tar.xz; gpgconf --kill all; rm -rf "$GNUPGHOME" python.tar.xz.asc; mkdir -p /usr/src/python; tar --extract --directory /usr/src/python --strip-components=1 --file python.tar.xz; rm python.tar.xz; cd /usr/src/python; gnuArch="$(dpkg-architecture --query DEB_BUILD_GNU_TYPE)"; ./configure --build="$gnuArch" --enable-loadable-sqlite-extensions --enable-optimizations --enable-option-checking=fatal --enable-shared $(test "${gnuArch%%-*}" != 'riscv64' && echo '--with-lto') --with-ensurepip ; nproc="$(nproc)"; EXTRA_CFLAGS="$(dpkg-buildflags --get CFLAGS)"; LDFLAGS="$(dpkg-buildflags --get LDFLAGS)"; LDFLAGS="${LDFLAGS:-} -Wl,--strip-all"; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:-}" ; rm python; make -j "$nproc" "EXTRA_CFLAGS=${EXTRA_CFLAGS:-}" "LDFLAGS=${LDFLAGS:-} -Wl,-rpath='\$\$ORIGIN/../lib'" python ; make install; cd /; rm -rf /usr/src/python; find /usr/local -depth \( \( -type d -a \( -name test -o -name tests -o -name idle_test \) \) -o \( -type f -a \( -name '*.pyc' -o -name '*.pyo' -o -name 'libpython*.a' \) \) \) -exec rm -rf '{}' + ; ldconfig; apt-mark auto '.*' > /dev/null; apt-mark manual $savedAptMark; find /usr/local -type f -executable -not \( -name '*tkinter*' \) -exec ldd '{}' ';' | awk '/=>/ { so = $(NF-1); if (index(so, "/usr/local/") == 1) { next }; gsub("^/(usr/)?", "", so); printf "*%s\n", so }' | sort -u | xargs -rt dpkg-query --search | awk 'sub(":$", "", $1) { print $1 }' | sort -u | xargs -r apt-mark manual ; apt-get purge -y --auto-remove -o APT::AutoRemove::RecommendsImportant=false; apt-get dist-clean; export PYTHONDONTWRITEBYTECODE=1; python3 --version; pip3 install --disable-pip-version-check --no-cache-dir --no-compile 'setuptools==79.0.1' 'wheel==0.46.3' ; pip3 --version # buildkit
RUN /bin/sh -c set -eux; for src in idle3 pip3 pydoc3 python3 python3-config; do dst="$(echo "$src" | tr -d 3)"; [ -s "/usr/local/bin/$src" ]; [ ! -e "/usr/local/bin/$dst" ]; ln -svT "$src" "/usr/local/bin/$dst"; done # buildkit
CMD ["python3"]
RUN /bin/sh -c apt-get update && apt-get install -y --no-install-recommends curl gosu nodejs npm ca-certificates git sudo util-linux docker.io xdotool scrot rsync e2fsprogs && rm -rf /var/lib/apt/lists/* # buildkit
RUN /bin/sh -c npm install -g @anthropic-ai/claude-code # buildkit
RUN /bin/sh -c command -v claude >/dev/null 2>&1 || (echo "ERROR: claude CLI not found in PATH" >&2 && exit 1) # buildkit
RUN /bin/sh -c useradd -u 1000 -m -s /bin/bash agent && mkdir -p /agent-home && chown agent:agent /agent-home # buildkit
RUN /bin/sh -c set -eux; printf 'agent ALL=(ALL) NOPASSWD:ALL\n' > /etc/sudoers.d/agent-t4; chmod 0440 /etc/sudoers.d/agent-t4; visudo -cf /etc/sudoers.d/agent-t4; groupadd -f docker; groupadd -g 988 -f docker-host || true; usermod -aG docker agent; usermod -aG docker-host agent || true; id agent # buildkit
ARG MCP_SERVER_VERSION=1.8.1
USER agent
RUN |1 MCP_SERVER_VERSION=1.8.1 /bin/sh -c set -eux; mkdir -p /home/agent/.npm; printf '@molecule-ai:registry=https://git.moleculesai.app/api/packages/molecule-ai/npm/\n' > /home/agent/.npmrc; warm="$(mktemp -d)"; cd "$warm"; npm init -y >/dev/null 2>&1; npm install --no-audit --no-fund --loglevel=error "@molecule-ai/mcp-server@${MCP_SERVER_VERSION}"; printf '%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"prebake","version":"1"}}}' | MOLECULE_MCP_MODE=management timeout 60 npx -y --prefer-offline "@molecule-ai/mcp-server@${MCP_SERVER_VERSION}" >/dev/null 2>&1 || true; cd /; rm -rf "$warm"; printf '%s\n%s\n' '{"jsonrpc":"2.0","id":1,"method":"initialize","params":{"protocolVersion":"2024-11-05","capabilities":{},"clientInfo":{"name":"verify","version":"1"}}}' '{"jsonrpc":"2.0","id":2,"method":"tools/list","params":{}}' | MOLECULE_MCP_MODE=management timeout 60 npx -y --offline "@molecule-ai/mcp-server@${MCP_SERVER_VERSION}" 2>/dev/null | grep -q provision_workspace || (echo "ERROR: pre-baked @molecule-ai/mcp-server@${MCP_SERVER_VERSION} did not resolve OFFLINE or provision_workspace missing — the concierge warm-up bake is broken" >&2 && exit 1) # buildkit
USER root
WORKDIR /app
ARG RUNTIME_VERSION=0.3.102
ARG PIP_INDEX_URL=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/
ARG PIP_EXTRA_INDEX_URL=https://pypi.org/simple/
COPY requirements.txt . # buildkit
RUN |4 MCP_SERVER_VERSION=1.8.1 RUNTIME_VERSION=0.3.102 PIP_INDEX_URL=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ PIP_EXTRA_INDEX_URL=https://pypi.org/simple/ /bin/sh -c pip install --no-cache-dir --index-url "${PIP_INDEX_URL}" --extra-index-url "${PIP_EXTRA_INDEX_URL}" -r requirements.txt && if [ -n "${RUNTIME_VERSION}" ]; then pip install --no-cache-dir --index-url "${PIP_INDEX_URL}" --extra-index-url "${PIP_EXTRA_INDEX_URL}" --upgrade "molecules-workspace-runtime==${RUNTIME_VERSION}"; fi # buildkit
COPY scripts/patch_claude_sdk_2_1_150.py /tmp/patch_claude_sdk_2_1_150.py # buildkit
RUN |4 MCP_SERVER_VERSION=1.8.1 RUNTIME_VERSION=0.3.102 PIP_INDEX_URL=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ PIP_EXTRA_INDEX_URL=https://pypi.org/simple/ /bin/sh -c python3 /tmp/patch_claude_sdk_2_1_150.py && rm /tmp/patch_claude_sdk_2_1_150.py # buildkit
COPY adapter.py . # buildkit
COPY __init__.py . # buildkit
COPY config.yaml . # buildkit
COPY claude_sdk_executor.py . # buildkit
ENV ADAPTER_MODULE=adapter
COPY scripts/molecule-git-token-helper.sh /app/scripts/molecule-git-token-helper.sh # buildkit
COPY scripts/molecule-gh-token-refresh.sh /app/scripts/molecule-gh-token-refresh.sh # buildkit
RUN |4 MCP_SERVER_VERSION=1.8.1 RUNTIME_VERSION=0.3.102 PIP_INDEX_URL=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ PIP_EXTRA_INDEX_URL=https://pypi.org/simple/ /bin/sh -c chmod +x /app/scripts/molecule-git-token-helper.sh /app/scripts/molecule-gh-token-refresh.sh # buildkit
COPY scripts/molecule-askpass /usr/local/bin/molecule-askpass # buildkit
RUN |4 MCP_SERVER_VERSION=1.8.1 RUNTIME_VERSION=0.3.102 PIP_INDEX_URL=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ PIP_EXTRA_INDEX_URL=https://pypi.org/simple/ /bin/sh -c chmod +x /usr/local/bin/molecule-askpass # buildkit
COPY scripts/setup-gitea-netrc.sh /usr/local/bin/setup-gitea-netrc.sh # buildkit
COPY bin/gitea-curl /usr/local/bin/gitea-curl # buildkit
RUN |4 MCP_SERVER_VERSION=1.8.1 RUNTIME_VERSION=0.3.102 PIP_INDEX_URL=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ PIP_EXTRA_INDEX_URL=https://pypi.org/simple/ /bin/sh -c chmod +x /usr/local/bin/setup-gitea-netrc.sh /usr/local/bin/gitea-curl # buildkit
COPY entrypoint.sh /entrypoint.sh # buildkit
RUN |4 MCP_SERVER_VERSION=1.8.1 RUNTIME_VERSION=0.3.102 PIP_INDEX_URL=https://git.moleculesai.app/api/packages/molecule-ai/pypi/simple/ PIP_EXTRA_INDEX_URL=https://pypi.org/simple/ /bin/sh -c chmod +x /entrypoint.sh # buildkit
ENTRYPOINT ["/entrypoint.sh"]

Labels

Key Value
org.opencontainers.image.description Molecule AI workspace template — claude-code runtime
org.opencontainers.image.revision 7d2cc10940a982e0a723475089995cb43d639d2d
org.opencontainers.image.source https://git.moleculesai.app/molecule-ai/molecule-ai-workspace-template-claude-code
Details
Container
2026-07-09 11:28:34 +00:00
0
OCI / Docker
linux/amd64
702 MiB
Versions (9) View all
latest 2026-07-09
sha-7d2cc10 2026-07-09
sha-18277e3 2026-07-08
sha-9c6f9ed 2026-07-08
sha-d37eeff 2026-07-08