12/15/2023 0 Comments Postgresql dockerThe following is the command I used to create my data container. Thankfully I found this blog post which shows how to use a secondary container for the data leaving the Postgres container able to be destroyed and recreated as needed. The problem with this approach is if you ever need to rebuild the container for some reason, like a new version of Postgres is released, your data will be lost. docker run -p 5432:5432 -name yourContainerName -e POSTGRES_PASSWORD=yourPassword -d postgres Getting up and going with a container running Postgres was pretty simple and could be done with the following command which will create a container and expose the port used by Postgres so it can be accessed from the host. This message shows that your installation appears to be working correctly. You should output that starts with the following if your installation is working. Open a command prompt and run the following command. When I logged back in I got a message about Hyper-V not being enabled.Īfter logging back in I then got the following message about hardware-assisted virtualization not being enabled.Īfter tweaking my BIOS settings and logging back in I was greeted by the Docker welcome screen. After the install is complete you will have to log out and back in. Head to this link and click the Get Docker link to download the installer. In the end, I decided to try and run the Postgres process using Docker instead installing directly on Windows or dealing with a full VM. This kicked off a lot of searching on my part and didn’t find a good definitive answer on why that is or isn’t the way to do. This is the route I was going to at first, but in Rob’s book, he suggests using a VM for Postgres installation on Windows. On the download section of the official Postgres site, there is an option to download an installer. For personal projects SQL Server’s cost and be prohibitive and the release of Rob’s book added up to a good time to give PostgreSQL a try. I have a lot of experience using Microsoft’s SQL Server, but up until now, I haven’t touched PostgreSQL. Over the weekend I finally got the chance to start reading A Curious Moon by Rob Conery which is a book on learning PostgreSQL by following the fictional Dee Yan as she is thrown into database administrator role at an aerospace startup.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |