diff --git a/Dockerfile b/Dockerfile index d2ab66041c..b37a2a48c9 100644 --- a/Dockerfile +++ b/Dockerfile @@ -263,8 +263,6 @@ RUN mkdir -p -m 777 /tmp/windmill/logs /tmp/windmill/search /tmp/.cache && chmod # (cache files already have 666 from umask copy above, cache_nomount is read-only) RUN find ${APP} /tmp/windmill -type d -exec chmod 777 {} + -USER root - EXPOSE 8000 CMD ["windmill"] diff --git a/docker/DockerfileSlim b/docker/DockerfileSlim index 03761df2a7..d35df2ce6a 100644 --- a/docker/DockerfileSlim +++ b/docker/DockerfileSlim @@ -23,9 +23,14 @@ ENV TZ=Etc/UTC # Install UV RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.6.2/uv-installer.sh | sh && mv /root/.local/bin/uv /usr/local/bin/uv -# Preinstall python runtime -RUN uv python install $LATEST_STABLE_PY -RUN uv venv +# Preinstall python runtime to temp location (will copy with world-writable perms later) +RUN UV_PYTHON_INSTALL_DIR=/tmp/build_cache/py_runtime uv python install $LATEST_STABLE_PY + +# Copy to final location with world-writable permissions for arbitrary UID support +RUN mkdir -p /tmp/windmill/cache && \ + cp -r /tmp/build_cache/* /tmp/windmill/cache/ && \ + chmod -R a+rw /tmp/windmill/cache && \ + rm -rf /tmp/build_cache COPY --from=oven/bun:1.2.23 /usr/local/bin/bun /usr/bin/bun @@ -44,6 +49,14 @@ RUN windmill cache ${APP}/hubPaths.json RUN rm ${APP}/hubPaths.json +# Create directories and make world-accessible for arbitrary UID support +RUN mkdir -p -m 777 /tmp/windmill/logs /tmp/windmill/search /tmp/.cache && \ + chmod 777 /tmp/.cache && \ + find ${APP} /tmp/windmill -type d -exec chmod 777 {} + + +# Set HOME for arbitrary UID support (Docker sets HOME=/ for unknown UIDs) +ENV HOME=/tmp + EXPOSE 8000 CMD ["windmill"] diff --git a/docker/DockerfileSlimEe b/docker/DockerfileSlimEe index 1dafcf9660..b3c3b791a7 100644 --- a/docker/DockerfileSlimEe +++ b/docker/DockerfileSlimEe @@ -23,9 +23,14 @@ ENV TZ=Etc/UTC # Install UV RUN curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/0.6.2/uv-installer.sh | sh && mv /root/.local/bin/uv /usr/local/bin/uv -# Preinstall python runtime -RUN uv python install $LATEST_STABLE_PY -RUN uv venv +# Preinstall python runtime to temp location (will copy with world-writable perms later) +RUN UV_PYTHON_INSTALL_DIR=/tmp/build_cache/py_runtime uv python install $LATEST_STABLE_PY + +# Copy to final location with world-writable permissions for arbitrary UID support +RUN mkdir -p /tmp/windmill/cache && \ + cp -r /tmp/build_cache/* /tmp/windmill/cache/ && \ + chmod -R a+rw /tmp/windmill/cache && \ + rm -rf /tmp/build_cache COPY --from=oven/bun:1.2.23 /usr/local/bin/bun /usr/bin/bun @@ -44,6 +49,14 @@ RUN windmill cache ${APP}/hubPaths.json RUN rm ${APP}/hubPaths.json +# Create directories and make world-accessible for arbitrary UID support +RUN mkdir -p -m 777 /tmp/windmill/logs /tmp/windmill/search /tmp/.cache && \ + chmod 777 /tmp/.cache && \ + find ${APP} /tmp/windmill -type d -exec chmod 777 {} + + +# Set HOME for arbitrary UID support (Docker sets HOME=/ for unknown UIDs) +ENV HOME=/tmp + EXPOSE 8000 CMD ["windmill"]