chore(docker): update docker base images (#8796)

Co-authored-by: Xingyao Wang <xingyaoww@gmail.com>
This commit is contained in:
Rene Leonhardt 2025-06-10 16:48:46 +02:00 committed by GitHub
parent e04f876df9
commit 07862c32cb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 39 additions and 19 deletions

View File

@ -1,5 +1,23 @@
# NodeJS
frontend/node_modules frontend/node_modules
config.toml
.envrc # Configuration (except pyproject.toml)
.env *.ini
.git *.toml
!pyproject.toml
*.yml
# Documentation (except README.md)
*.md
!README.md
# Hidden files and directories
.*
__pycache__
# Unneded files and directories
/dev_config/
/docs/
/evaluation/
/tests/
CITATION.cff

View File

@ -72,3 +72,9 @@ updates:
directory: "/" directory: "/"
schedule: schedule:
interval: "weekly" interval: "weekly"
- package-ecosystem: "docker"
directories:
- "containers/*"
schedule:
interval: "weekly"

View File

@ -1,16 +1,16 @@
ARG OPENHANDS_BUILD_VERSION=dev ARG OPENHANDS_BUILD_VERSION=dev
FROM node:21.7.2-bookworm-slim AS frontend-builder FROM node:22.16.0-bookworm-slim AS frontend-builder
WORKDIR /app WORKDIR /app
COPY ./frontend/package.json frontend/package-lock.json ./ COPY frontend/package.json frontend/package-lock.json ./
RUN npm install -g npm@10.5.1
RUN npm ci RUN npm ci
COPY ./frontend ./ COPY frontend ./
RUN npm run build RUN npm run build
FROM python:3.12.3-slim AS backend-builder FROM python:3.12.10-slim AS base
FROM base AS backend-builder
WORKDIR /app WORKDIR /app
ENV PYTHONPATH='/app' ENV PYTHONPATH='/app'
@ -22,17 +22,18 @@ ENV POETRY_NO_INTERACTION=1 \
RUN apt-get update -y \ RUN apt-get update -y \
&& apt-get install -y curl make git build-essential \ && apt-get install -y curl make git build-essential \
&& python3 -m pip install poetry==1.8.2 --break-system-packages && python3 -m pip install poetry --break-system-packages
COPY ./pyproject.toml ./poetry.lock ./ COPY pyproject.toml poetry.lock ./
RUN touch README.md RUN touch README.md
RUN export POETRY_CACHE_DIR && poetry install --no-root && rm -rf $POETRY_CACHE_DIR RUN export POETRY_CACHE_DIR && poetry install --no-root && rm -rf $POETRY_CACHE_DIR
FROM python:3.12.3-slim AS openhands-app FROM base AS openhands-app
WORKDIR /app WORKDIR /app
ARG OPENHANDS_BUILD_VERSION #re-declare for this section # re-declare for this section
ARG OPENHANDS_BUILD_VERSION
ENV RUN_AS_OPENHANDS=true ENV RUN_AS_OPENHANDS=true
# A random number--we need this to be different from the user's UID on the host machine # A random number--we need this to be different from the user's UID on the host machine
@ -74,12 +75,7 @@ COPY --chown=openhands:app --chmod=770 --from=backend-builder ${VIRTUAL_ENV} ${V
COPY --chown=openhands:app --chmod=770 ./microagents ./microagents COPY --chown=openhands:app --chmod=770 ./microagents ./microagents
COPY --chown=openhands:app --chmod=770 ./openhands ./openhands COPY --chown=openhands:app --chmod=770 ./openhands ./openhands
COPY --chown=openhands:app --chmod=777 ./openhands/runtime/plugins ./openhands/runtime/plugins COPY --chown=openhands:app --chmod=777 ./openhands/runtime/plugins ./openhands/runtime/plugins
COPY --chown=openhands:app --chmod=770 ./openhands/agenthub ./openhands/agenthub COPY --chown=openhands:app pyproject.toml poetry.lock README.md MANIFEST.in LICENSE ./
COPY --chown=openhands:app ./pyproject.toml ./pyproject.toml
COPY --chown=openhands:app ./poetry.lock ./poetry.lock
COPY --chown=openhands:app ./README.md ./README.md
COPY --chown=openhands:app ./MANIFEST.in ./MANIFEST.in
COPY --chown=openhands:app ./LICENSE ./LICENSE
# This is run as "openhands" user, and will create __pycache__ with openhands:openhands ownership # This is run as "openhands" user, and will create __pycache__ with openhands:openhands ownership
RUN python openhands/core/download.py # No-op to download assets RUN python openhands/core/download.py # No-op to download assets