File size: 1,158 Bytes
9334ab9
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
# Use a minimal base image since the actual runtime is handled by the provided image
FROM python:3.9-slim

# Install Docker CLI in the container to manage Docker commands
RUN apt-get update && apt-get install -y \
    docker.io \
    && rm -rf /var/lib/apt/lists/*

# Set working directory
WORKDIR /app

# Copy any necessary files (if needed, e.g., scripts or configuration)
# COPY . .

# Set environment variables as specified in the command
ENV SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.41-nikolaik
ENV LOG_ALL_EVENTS=true

# Expose the port specified in the command
EXPOSE 3000

# Run the Docker command to start the openhands-app container
CMD ["docker", "run", "-it", "--rm", "--pull=always", \
     "-e", "SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.41-nikolaik", \
     "-e", "LOG_ALL_EVENTS=true", \
     "-v", "/var/run/docker.sock:/var/run/docker.sock", \
     "-v", "/.openhands-state:/.openhands-state", \
     "-p", "3000:3000", \
     "--add-host", "host.docker.internal:host-gateway", \
     "--name", "openhands-app", \
     "docker.all-hands.dev/all-hands-ai/openhands:0.41"]