|
|
|
FROM ubuntu:latest |
|
|
|
|
|
RUN apt-get update && apt-get install -y \ |
|
curl \ |
|
wget \ |
|
unzip \ |
|
git \ |
|
python3-pip \ |
|
libmagic-dev \ |
|
lsb-release \ |
|
lsof \ |
|
postgresql \ |
|
gnupg |
|
|
|
|
|
RUN curl -fsSL https://www.postgresql.org/media/keys/ACCC4CF8.asc | gpg --dearmor -o /etc/apt/trusted.gpg.d/postgresql.gpg |
|
|
|
|
|
RUN apt-get update && apt-get install -y postgresql-client-16 postgresql-server-dev-16 |
|
|
|
|
|
RUN groupadd -r foobar && useradd -r -g foobar foobar |
|
|
|
|
|
RUN mkdir -p /var/lib/postgresql/data && \ |
|
chown -R foobar:foobar /var/lib/postgresql/data |
|
|
|
|
|
COPY entrypoint.sh /usr/local/bin/ |
|
RUN chmod +x /usr/local/bin/entrypoint.sh |
|
|
|
|
|
EXPOSE 5432 |
|
|
|
|
|
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] |
|
|