Base
This commit is contained in:
13
db_archive/docker/Dockerfile
Normal file
13
db_archive/docker/Dockerfile
Normal file
@ -0,0 +1,13 @@
|
||||
# Use the official PostgreSQL image from the Docker Hub
|
||||
FROM postgres:16.2
|
||||
|
||||
# RUN apt-get update
|
||||
# RUN apt-get install vim -y
|
||||
|
||||
# Add your initialization script to the container
|
||||
COPY ./tools/postgres_init.sh /docker-entrypoint-initdb.d/postgres_init.sh
|
||||
|
||||
# COPY ./conf/pg_hba.conf /etc/postgresql/pg_hba.conf
|
||||
|
||||
# Ensure the script is executable
|
||||
RUN chmod +x /docker-entrypoint-initdb.d/postgres_init.sh
|
||||
7
db_archive/docker/tools/postgres_init.sh
Normal file
7
db_archive/docker/tools/postgres_init.sh
Normal file
@ -0,0 +1,7 @@
|
||||
#!/bin/bash
|
||||
|
||||
# Specify the path to your file
|
||||
file_path="/var/lib/postgresql/data/pg_hba.conf"
|
||||
|
||||
# Use sed to replace "trust" with "m5a" in the file
|
||||
sed -i 's/trust/md5/g' "$file_path"
|
||||
Reference in New Issue
Block a user