How to set up GH codespace to be able to use postgres

81 Views Asked by At

I am a newbie to codespaces and to docker. I want a codespace environment with postgres installed so that I can use the command line to create and play around with simple SQL commands to make a database, create a table, add some data, do some select queries, that kind of thing. I don't really need more than this but being able to use node.js would be cool too. Questions - is this even possible on codespace? If so how? I have tried searching for a guide or video aimed at beginners but can't find anything. If anyone can point me in the right direction or even at a github repo that I could clone that does this that would be amazing! Many thanks in advance

1

There are 1 best solutions below

2
Schwern On

You can use the Dev Containers extension to Visual Studio Code to add a predefined container configuration to your codespace.

enter image description here

See Introduction to Dev Containers: Using a Predefined Dev Container Configuration.