Newer
Older
Create test database
```shell
docker run --name postgres -e POSTGRES_PASSWORD=pwd -p 5000:5432 -d postgres:15-alpine
```
Create sql insert file
```shell
node script.mjs <input-file.txt> > <sql-file.sql>
```
Copy the sql file in the container
```shell
docker cp ./<sql-file.sql> postgres:/<sql-file.sql>
```
Go inside your postgres container
```shell
docker exec -it postgres psql -U postgres
```
Execute the sql insert file
```shell
\i ./<sql-file.sql>
```