File size: 1,001 Bytes
0832091
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
42
43
# set base image (host OS)
FROM python:3.11-slim

# Install gettext for envsubst
RUN apt-get update && apt-get install -y gettext && rm -rf /var/lib/apt/lists/*


RUN pip install --upgrade pip

RUN adduser --disabled-password -q worker
USER worker
ENV PATH="/home/user/.local/bin:$PATH"

# set the working directory in the container
WORKDIR /code

# ENV PATH='/home/worker/.local/bin:$PATH'
RUN mkdir /code/app

COPY --chown=worker:worker app /code/app

# install dependencies
COPY --chown=worker:worker requirements.txt requirements.txt
RUN pip install --user -r requirements.txt

LABEL maintainer="Satya Dillikar <[email protected]>" \
      version="1.0.0"

ARG FLASK_PORT
# Expose port for Flask
EXPOSE ${FLASK_PORT}
RUN echo FLASK_PORT $FLASK_PORT

# ARG MY_API_DOMAIN_URL
# ENV MY_API_DOMAIN_URL=${MY_API_DOMAIN_URL}
# RUN echo MY_API_DOMAIN_URL $MY_API_DOMAIN_URL

# Set the entrypoint
ENTRYPOINT ["app/entrypoint.sh"]

# command to run on container start
CMD ["python", "app/main.py" ]