File size: 699 Bytes
7d32e22
 
9647270
daeb470
 
 
 
 
 
 
2d6a7aa
7d32e22
 
 
2d6a7aa
7d32e22
 
2d6a7aa
7d32e22
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
# Use the latest Ubuntu image as the base
FROM ubuntu:latest

# Add the PostgreSQL repository
RUN apt-get install -y gnupg
RUN sh -c 'echo "deb http://apt.postgresql.org/pub/repos/apt $(lsb_release -cs)-pgdg main" > /etc/apt/sources.list.d/pgdg.list'
RUN wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | apt-key add -

# Install PostgreSQL 16 client
RUN apt-get update && apt-get install -y postgresql-client-16

# Copy the entrypoint script to the container
COPY entrypoint.sh /usr/local/bin/
RUN chmod +x /usr/local/bin/entrypoint.sh

# Expose the default PostgreSQL port
EXPOSE 5432

# Set the ENTRYPOINT to the entrypoint script
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"]