-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathDockerfile
44 lines (29 loc) · 1.32 KB
/
Dockerfile
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
44
FROM python:3.10
ENV PYTHONUNBUFFERED 1
EXPOSE 8000
RUN mkdir /daksha
# Set the working directory to /ui_automation_engine
WORKDIR /daksha
# Copy the current directory contents into the container at /ui_automation_engine
ADD . /daksha/
# Copy the script file for startup
# COPY startup_command.sh /daksha/
#gives required premissions
RUN chmod og+x -R /daksha
# Install any needed packages specified in requirements.txt
RUN pip install -r ./requirements.txt
#Ubuntu releases are only supported for 9 months. LTS (Long Term Support) releases have support for 5 years.
# Once support is cut for the version you're using, you'll see error messages.
#Ubuntu moves the repositories to another server and the defined URL to reach the sources are no longer available on default location
#We use the sed command to update the sources in /etc/apt/sources.list file to the new location for
#old package repositories.
#RUN sed -i 's/stable\/updates/stable-security\/updates/' /etc/apt/sources.list
#RUN sed -i 's/stable\/updates/stable-security\/updates/' /etc/apt/sources.list.d/debian.sources
COPY startup_command.sh /usr/local/bin/startup_command.sh
RUN chmod +x /usr/local/bin/startup_command.sh
# Update the package files
RUN apt-get update
# Install the cron package
RUN apt-get install -y cron
# start server
CMD ["startup_command.sh"]