To serve as a central location to store database schema and the Dockerfiles associated with the database.
- Run the database as a standalone container
- Seed the database on initialization
- Run the database as a service in a docker-compose file in a separate repo
- Have a "Prod" startup configuration where the schema is implemented
- Have a "Dev" startup configuration where the schema is implemented and data is seeded
Steps:
- Verify docker is installed with
docker --version
- Change directory to the root of this repo
- Build the image from the Docker file with
docker build -t db .
- Run the built image with
docker run -p 5432:5432 db
(This will expose the database on port 5432)
At this point the database is running as a container