I am trying to build docker image with postgres data included.I am following below link.
https://sharmank.medium.com/build-postgres-docker-image-with-data-included-489bd58a1f9e
It is built with data as below.
REPOSITORY TAG IMAGE ID CREATED SIZE
db_image_with_data latest 48b5d776e7d6 2 hours ago 1.67GB
I could see data is available in images using below command
docker run --env PGDATA=postgres -p 5432:5432 -I db_image_with_data
I have pushed same image to docker hub and I have configured same image in kubernets .
But only db has created there is no data populated in db.
kubectl exec my-database-7c4bb7bdd7-m8sjd -n dev-app -- sh -c 'psql -U "postgres" -d "devapp" -c "select * from execution_groups"'
id | groupname | grouptype | user_id | tag | created_at | updated_at | group_id
----+-----------+-----------+---------+--------+------------+------------+----------
(0 rows)
Is there anything i am missing out here?