I'm kind of new to backend and especially things like docker and ssh, etc. so please bear with me :)In our team, we have a test database on a server (imagine a VPS) and as I've heard from my colleague, the database is running inside a docker container. now when I want to develop something on my laptop, it's convenient that I use a "filled" database and unfortunately I don't have a .sql file of our database for the time being.So I want to connect my backend code to the database running on the test server. I asked my colleague and he told me something like I first have to SSH into our server and then run:docker inspect "db-name" | grep IPThen I should memorize the IPAddress (I guess because the "db address" isn't static?) which is there and then run (in another normal cmd window):ssh [server@s](mailto:server@5.201.189.113)taticIP -p destinationPort -L 3333:IPAddress:DBPortNow I expected that the our test db would be run in my machine's port 3333. but it just asks for credentials of our server and then just connects to our server and nothing happens.I'm really stupid in things like this and I can't follow what's happening. What am I doing wrong now?And how can I gain a deeper understanding of docker and all these DevOpsy things.
Submitted July 21, 2020 at 03:54PM by fiveMop
No comments:
Post a Comment