bpandey23 commited on
Commit
7d32e22
1 Parent(s): 36faa5c

Update Dockerfile

Browse files
Files changed (1) hide show
  1. Dockerfile +11 -33
Dockerfile CHANGED
@@ -1,37 +1,15 @@
1
- FROM ubuntu:22.04
 
2
 
3
- # Install necessary packages
4
- RUN apt-get update && apt-get install -y \
5
- curl \
6
- wget \
7
- unzip \
8
- git \
9
- python3-pip \
10
- libmagic-dev \
11
- lsb-release \
12
- lsof \
13
- software-properties-common
14
 
15
- # # Add the PostgreSQL repository
16
- # RUN apt-get install -y gnupg
17
- # RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
18
- # RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -
19
 
20
- # # Install PostgreSQL 16 client
21
- # RUN apt-get update && apt-get install -y postgresql-client-16
22
 
23
- COPY ./ /postgres/
24
-
25
- WORKDIR postgres
26
-
27
- RUN pwd
28
-
29
- # Install Python dependencies
30
- RUN pip3 install -r requirements.txt
31
-
32
- # Expose ports
33
- EXPOSE 8501
34
-
35
-
36
-
37
- CMD ["python3", "-m", "streamlit", "run", "app.py"]
 
1
+ # Use the latest Ubuntu image as the base
2
+ FROM ubuntu:latest
3
 
4
+ # Update the package lists and install PostgreSQL
5
+ RUN apt-get update && apt-get install -y postgresql-13 postgresql-client-13
 
 
 
 
 
 
 
 
 
6
 
7
+ # Copy the entrypoint script to the container
8
+ COPY entrypoint.sh /usr/local/bin/
9
+ RUN chmod +x /usr/local/bin/entrypoint.sh
 
10
 
11
+ # Expose the default PostgreSQL port
12
+ EXPOSE 5432
13
 
14
+ # Set the ENTRYPOINT to the entrypoint script
15
+ ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]