A reactive notebook for Python — run reproducible experiments, query with SQL, execute as a script, deploy as an app, and version with git. Stored as pure Python. All in a modern, AI-native editor.
Python artificial-intelligencedagdata-sciencedata-visualizationdataflowdeveloper-toolsmachine-learningnotebookspipelinepythonreactivesqlweb-app
docker: update Dockerfile with metadata labels, environment variables, and user permissions (#8637)
Myles Scolnickf73cbbab6f7d
diff --git a/docker/Dockerfile b/docker/Dockerfileindex 1d93de836c..a3765c9a66 100644--- a/docker/Dockerfile+++ b/docker/Dockerfile@@ -1,8 +1,11 @@# syntax=docker/dockerfile:1.12FROM python:3.13-slim AS base+LABEL org.opencontainers.image.source="https://github.com/marimo-team/marimo"+LABEL org.opencontainers.image.description="marimo reactive notebook"+# Make `uv` and `uvx` available in the PATH for all target images-COPY --from=ghcr.io/astral-sh/uv:latest /uv /uvx /bin/+COPY --from=ghcr.io/astral-sh/uv:0.10.9 /uv /uvx /bin/# Create a non-root userRUN useradd -m appuser@@ -10,11 +13,17 @@ RUN useradd -m appuserWORKDIR /appARG marimo_version=0.12.8+LABEL org.opencontainers.image.version="${marimo_version}"+ENV MARIMO_SKIP_UPDATE_CHECK=1ENV UV_SYSTEM_PYTHON=1+ENV UV_COMPILE_BYTECODE=1+ENV UV_LINK_MODE=copyRUN uv pip install --no-cache-dir marimo==${marimo_version} && \mkdir -p /app/data && \- chown -R appuser:appuser /app+ chown -R appuser:appuser /app && \+ chown -R appuser:appuser /usr/local/lib/python3.13/site-packages/ && \+ chown -R appuser:appuser /usr/local/bin/COPY --chown=appuser:appuser marimo/_tutorials tutorialsRUN rm -rf tutorials/__init__.py@@ -24,16 +33,24 @@ EXPOSE $PORTENV HOST=0.0.0.0+STOPSIGNAL SIGTERM+# -slim entry pointFROM base AS slim-CMD marimo edit --no-token -p $PORT --host $HOST+USER appuser+CMD ["sh", "-c", "exec marimo edit --no-token -p $PORT --host $HOST"]# -data entry pointFROM base AS data-RUN uv pip install --no-cache-dir marimo[recommended,lsp] altair pandas numpy-CMD marimo edit --no-token -p $PORT --host $HOST+USER appuser+RUN uv pip install --no-cache-dir \+ altair \+ marimo[recommended,lsp] \+ numpy \+ pandas+CMD ["sh", "-c", "exec marimo edit --no-token -p $PORT --host $HOST"]# -sql entry point, extends -dataFROM data AS sql-RUN uv pip install --no-cache-dir marimo[recommended,lsp,sql]-CMD marimo edit --no-token -p $PORT --host $HOST+RUN uv pip install --no-cache-dir marimo[sql]+CMD ["sh", "-c", "exec marimo edit --no-token -p $PORT --host $HOST"]