File size: 971 Bytes
7bbdee4
8dc7642
7bbdee4
 
 
0076ba5
8dc7642
9345786
 
 
 
 
8dc7642
9345786
0076ba5
9345786
8dc7642
9345786
 
0076ba5
9345786
7bbdee4
9345786
2729d67
 
8dc7642
 
 
 
9345786
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
FROM python:3.11-slim

WORKDIR /app
ENV PYTHONDONTWRITEBYTECODE=1
ENV PYTHONUNBUFFERED=1
ENV ENABLE_WEB_INTERFACE=true

RUN echo '[build] apt-get begin' \
 && apt-get update \
 && apt-get install -y --no-install-recommends curl \
 && rm -rf /var/lib/apt/lists/* \
 && echo '[build] apt-get end'

RUN echo '[build] pip install begin' \
 && pip install --no-cache-dir "openenv-core[core]==0.2.1" "uvicorn>=0.35.0" \
 && echo '[build] pip install end'

RUN echo '[build] workdir contents before copy' && pwd && ls -la

COPY minimal_openenv_app.py /app/minimal_openenv_app.py
COPY scripts/start_minimal_space.sh /app/scripts/start_minimal_space.sh
COPY README.md /app/README.md

RUN chmod +x /app/scripts/start_minimal_space.sh \
 && echo '[build] copied files' && ls -la /app && ls -la /app/scripts

HEALTHCHECK --interval=30s --timeout=5s --start-period=20s --retries=10 \
    CMD curl -f http://localhost:8000/health || exit 1

CMD ["/app/scripts/start_minimal_space.sh"]