Dockerized DEV Environment with DevContainers | Multiple Containers | VSCode

  Рет қаралды 5,070

Chandra Shettigar

Chandra Shettigar

Күн бұрын

Пікірлер: 19
@shaktigoyal6713
@shaktigoyal6713 4 ай бұрын
I have been using DevContainer for a long time now.. this is really good video.. crisp and clear.. covering many scenarios .. Thank you for video !
@ChandraShettigar
@ChandraShettigar 4 ай бұрын
Thanks for watching and for your kind words, Shakti. It's good to hear you're already familiar with DevContainer and found the video valuable.
@EzequielTejada
@EzequielTejada 8 ай бұрын
Great video!!! Also, I liked the way you setup multiple containers 👏👏👏
@ChandraShettigar
@ChandraShettigar 8 ай бұрын
Glad you liked it!! Thanks for watching and sharing your thoughts.
@aproperhooligan5950
@aproperhooligan5950 6 ай бұрын
Really nice and concise content, Chandra. Thanks!
@ChandraShettigar
@ChandraShettigar 6 ай бұрын
Glad you liked it! Thanks for watching and sharing your thoughts.
@ahmedsalahel-din1311
@ahmedsalahel-din1311 Ай бұрын
When VS Code prompted you to open dev container (Rails or MySQL), you selected Rails one, I did not understand how come both of them got running togehter?
@ChandraShettigar
@ChandraShettigar Ай бұрын
Thats the docker-compose thing where we have db container defined as dependency for the app container.
@maheshsharma-zq2uc
@maheshsharma-zq2uc 6 ай бұрын
Can you help me in github codespace as i am using docker compose file to lauch postgres along with pgadmin but it is not opening in browser. Pgadmin is showing not reachable even port is also forwarded. Dont know why its not accessible from browser
@ChandraShettigar
@ChandraShettigar 6 ай бұрын
I haven't really tested any devcontainer setup on github codespace but I can give pgadmin and postgres a try. Can you share the docker-compose example you're working on? Even better, if you have github repo that you can share
@maheshsharma-zq2uc
@maheshsharma-zq2uc 6 ай бұрын
@@ChandraShettigar sure I will share it on tomorrow
@ChandraShettigar
@ChandraShettigar 6 ай бұрын
@@maheshsharma-zq2uc - I was able test a quick setup on github codespaces. Let me now if this is kind of setup you were hoping to create on github codespaces - dev.to/shettigarc/easy-github-codespaces-setup-your-app-postgres-and-pgadmin-3b08
@itrrmp
@itrrmp 3 ай бұрын
What a great video. I just wish it was a php setup!
@ChandraShettigar
@ChandraShettigar 2 ай бұрын
Thanks for the feedback! Glad you enjoyed the video. It wasn't specifically about PHP, but the general concepts should still apply. I'm curious if this video inspired you to give a PHP DevContainer a try?
@JorgeOrtiz-qn3rw
@JorgeOrtiz-qn3rw 7 ай бұрын
Great tutorial! Btw, I have a question. What is the purpose of the command in the app service? The "tail -f /dev/null" command? Thanks
@ChandraShettigar
@ChandraShettigar 7 ай бұрын
Thank you. The command "tail -f /dev/null" is a technique to keep a service container running indefinitely. I use this in DevContainer setup is to override the default CMD defined in Dockerfile. By default, I like the app run (in this case - the command is 'rails s -b 0.0.0.0') when used outside the DevContianer setup, but in the DevContainer I prefer it load the container without loading the application (rails) but we just need the the environment without everything installed. The command "tail -f /dev/null" essentially does nothing but wait indefinitely for new data to appear in /dev/null, which never happens. I hope this helps.
@JorgeOrtiz-qn3rw
@JorgeOrtiz-qn3rw 7 ай бұрын
@@ChandraShettigar Is there a problem if I omit that command?
@ChandraShettigar
@ChandraShettigar 7 ай бұрын
Not really, for the example code. But here are a couple of scenarios to test, The Dockerfile in the example has the CMD that runs the application server (rails s...). With that if you omit the "command" in docker-compose.yml, upon DevContainer Rebuild/Ropen, it should loan the environment just fine. But it already starts the application server (rails s ..). You should be able to hit localhost:3000/ and it should respond. Because I don't want it start the app server on loading the container environment, I set the command in docker-compose.yml, to basically do nothing. Another option, if we don't want the app server to start on loading the container environment, you could just change the CMD to either tail /dev/null or do something that is long running. That way, you can omit the "command" from docker-compose.yml And the "command" that tails /dev/null is omitted and CMD from Dockerfile is removed, DevContainer will fail to start as the container will exit as soon as it starts. It needs a command that runs idefinitely.
@petercosta1883
@petercosta1883 Ай бұрын
You can also write CMD ["sleep", "infinity"]
Setting Up DevOps Environment Locally With Docker Using Dev Containers
13:37
Coding Shorts #102: Using SQL Server Containers for Dev
11:00
Shawn Wildermuth
Рет қаралды 3,4 М.
Don’t Choose The Wrong Box 😱
00:41
Topper Guild
Рет қаралды 62 МЛН
Enceinte et en Bazard: Les Chroniques du Nettoyage ! 🚽✨
00:21
Two More French
Рет қаралды 42 МЛН
18 Weird and Wonderful ways I use Docker
26:18
NetworkChuck
Рет қаралды 481 М.
If you're not developing with this, you're wasting your time
14:30
Articulated Robotics
Рет қаралды 316 М.
Build Your Own Dev Container Using Docker and DevPod
7:37
Colin J Codesalot
Рет қаралды 1,3 М.
This free Chinese AI just crushed OpenAI's $200 o1 model...
4:41
Fireship
Рет қаралды 1,1 МЛН
My Favorite Way To Handle Dev Environments | VS Code Devcontainers
30:05
Working with Multiple Dev Containers in VS Code
9:46
Visual Studio Code
Рет қаралды 36 М.
How to Create a DEV Environment with Multiple Dev Containers
10:43
Frank Boucher
Рет қаралды 2,6 М.
Working with Dev Containers by Chris Ayers
40:33
Devoxx
Рет қаралды 16 М.
The Only Database Abstraction You Need | Prime Reacts
21:42
ThePrimeTime
Рет қаралды 235 М.
Never install locally
5:45
Coderized
Рет қаралды 1,9 МЛН