File size: 970 Bytes
0163307
b041b67
4fa74fa
0163307
 
4fa74fa
0163307
4fa74fa
 
 
 
 
 
 
0163307
 
4fa74fa
0163307
 
4fa74fa
0163307
 
 
 
 
 
 
 
 
 
2503ae0
b041b67
0163307
2503ae0
4fa74fa
 
0163307
4fa74fa
 
50a5ba4
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
32
33
34
35
36
37
38
39
40
41
# Use an official Python image as base
FROM python:3.12-slim

# Set environment variables to avoid interactive prompts during package installs
ENV DEBIAN_FRONTEND=noninteractive

# Install system dependencies
RUN apt-get update && apt-get install -y \
    build-essential \
    curl \
    software-properties-common \
    git \
    && rm -rf /var/lib/apt/lists/*

# Set up a new user named "user" with user ID 1000
RUN useradd -m -u 1000 user

# Switch to the "user" user
USER user

# Set home to the user's home directory
ENV HOME=/home/user \
	PATH=/home/user/.local/bin:$PATH

# Install the project into `/app`
WORKDIR $HOME/app

# Copy all the app code to the docker
COPY --chown=user . $HOME/app

# Install cmbagent
RUN pip install cmbagent>=0.0.1.post43

# This informs Docker that the container will listen on port 8501 at runtime.
EXPOSE 8501

# Command to run the app
HEALTHCHECK CMD curl --fail http://localhost:8501/_stcore/health

CMD ["cmbagent", "deploy"]