Skip to content

Commit 119acf2

Browse files
authored
Add Dockerfile for comps-base image (#1127)
Signed-off-by: Eero Tamminen <eero.t.tamminen@intel.com>
1 parent 3104454 commit 119acf2

File tree

1 file changed

+37
-0
lines changed

1 file changed

+37
-0
lines changed

Dockerfile

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
# Copyright (C) 2025 Intel Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Base image for GenAIComps based OPEA Python applications
5+
# Build: docker build -t opea/comps-base -f Dockerfile .
6+
7+
ARG IMAGE_NAME=python
8+
ARG IMAGE_TAG=3.11-slim
9+
10+
FROM ${IMAGE_NAME}:${IMAGE_TAG} AS base
11+
12+
ENV HOME=/home/user
13+
14+
RUN useradd -m -s /bin/bash user && \
15+
mkdir -p $HOME && \
16+
chown -R user $HOME
17+
18+
# get security updates
19+
RUN apt-get update && apt-get upgrade -y && \
20+
apt-get clean autoclean && \
21+
apt-get autoremove -y && \
22+
rm -rf /var/lib/apt/lists/*
23+
24+
WORKDIR $HOME
25+
26+
COPY *.toml *.py *.txt *.md LICENSE ./
27+
28+
RUN pip install --no-cache-dir --upgrade pip setuptools && \
29+
pip install --no-cache-dir -r requirements.txt
30+
31+
COPY comps/ comps/
32+
33+
ENV PYTHONPATH=$PYTHONPATH:$HOME
34+
35+
USER user
36+
37+
ENTRYPOINT ["sh", "-c", "set && ls -la"]

0 commit comments

Comments
 (0)