NitinBot002 commited on
Commit
904ee86
·
verified ·
1 Parent(s): a17c6f2

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +8 -14
Dockerfile CHANGED
@@ -4,30 +4,24 @@ FROM python:3.11-slim
4
  # Set working directory
5
  WORKDIR /app
6
 
7
- # Install system dependencies if needed
8
  RUN apt-get update && apt-get install -y \
9
  curl \
 
10
  && rm -rf /var/lib/apt/lists/*
11
 
12
  # Upgrade pip
13
  RUN pip install --upgrade pip
14
 
15
- # Install coral-server from PyPI
16
  RUN pip install coral-server
17
 
18
  # Expose port 5555
19
  EXPOSE 5555
20
 
21
- # Create a non-root user to run the application
22
- RUN useradd -m -u 1000 coral && \
23
- chown -R coral:coral /app
24
 
25
- # Switch to non-root user
26
- USER coral
27
-
28
- # Health check
29
- HEALTHCHECK --interval=30s --timeout=3s --start-period=40s --retries=3 \
30
- CMD curl -f http://localhost:5555/health || exit 1
31
-
32
- # Run coral-server on port 5555
33
- CMD ["python", "-m", "coral_server", "--port", "5555"]
 
4
  # Set working directory
5
  WORKDIR /app
6
 
7
+ # Install system dependencies
8
  RUN apt-get update && apt-get install -y \
9
  curl \
10
+ git \
11
  && rm -rf /var/lib/apt/lists/*
12
 
13
  # Upgrade pip
14
  RUN pip install --upgrade pip
15
 
16
+ # Install coral-server with specific version (check PyPI for latest)
17
  RUN pip install coral-server
18
 
19
  # Expose port 5555
20
  EXPOSE 5555
21
 
22
+ # Set environment variables if needed
23
+ ENV CORAL_SERVER_PORT=5555
24
+ ENV CORAL_SERVER_HOST=0.0.0.0
25
 
26
+ # Run coral-server
27
+ CMD ["coral-server", "run", "--host", "0.0.0.0", "--port", "5555"]