00:13 Docker Desktop Alternatives 00:50 How do we run a redis database locally? 01:39 Simple Example API Setup 02:30 Run an image with the docker CLI 06:21 docker CLI commands 08:50 A simple docker compose example 11:45 More complex example API setup 15:41 docker compose example with postgres 17:48 Persisting data with docker volumes 21:51 The case for custom images and containerization 23:32 Creating a custom image with a Dockerfile 30:02 Ignoring files with .dockerignore 31:03 Examine container files and execute commands with Docker Desktop 32:31 Run migrations and seeds from within the container 33:58 Make code changes without re-building image 34:55 Create a volume for node_modules to prevent internalBinding errors 36:35 Better development workflow with devcontainers 38:03 Optimize docker layer order for faster builds 40:09 Create a multi-stage Dockerfile for dev, build and prod 46:23 Share docker-compose.yml configurations 48:41 Thanks!
Wow great video! I’m so bad at this, is it possible to run like next js with docker and have a postgressql database offline? So I could work in a plane for example?
Let me take a minute and say that the production of these episodes is rocking my socks off! I love how CJ slides in in the beginning. 😆 And of course the content is top notch!
This is amazing - I've used docker for years for a lot of simple containers, and only recently started moving all my lengthy docker run commands into docker compose files. I've never touched dockerfiles because they looked too complex but this video taught me in 49 minutes what it would have taken me monthsto learn on my own. Thanks so much! (I now have some work to do to move away from a generic apache container pointing at a static volume to actually copying files in and building a proper app container!)
Excellent way to get rid of node module errors at 34:55 I have done so many crazy stuffs just to get rid of that in the past.. this is much simpler.. Thanks for sharing 😊
Would be great to have a follow up on this with "handling secrets in docker compose" and "remote machine deployments using docker compose". Thanks in advance!
Is Docker and Kubernetes the same thing? I am having a hard time wrapping my head around what clusters, k8s, k3s, and k9s all are as well. All the concepts you covered in this video resonate really well, but where does Kubernetes tie in to this whole container thing? Is Kubernetes just AWS specific? If you could answer this in a future office hours, that would be great!
Kubernetes is an "orchestration system" and allows us to manage and scale containers. It uses docker under the hood. Big applications / deployments typically use Kubernetes to spin up multiple instances of a given container behind a load balancer to scale automatically. -CJ
13:04 Bash tip! Use the shell's edit mode! $ export EDITOR="code --wait" Then do ^X ^E to enter edit mode! Now you are entering any command, into your preferred editor with multiline support. Just close the editor to execute :)
thanks CJ, i subscibed to Syntax only for you please can you make a video on how we can run multiple docker in on server and each docker get his own domain name
My next video in the self host series will show how to setup reverse proxies which allow you to do just that. Any service running on a port on your server (even through an exposed docker port) can be routed traffic via a domain / subdomain. Caddy makes this really easy and will also set up SSL certificates for you - caddyserver.com/ (I'll be using this in my next video) nginx, Apache and Traefik are other popular options. -CJ
this video has been super helpful for me, but i noticed the way you structured your Dockerfile, the node_modules end up in the final prod image. i believe you want to move copying package*.json and npm install under AS dev.
Thanks for watching and thanks for commenting! node_modules actually need to be in the production image as well, otherwise, imports for 3rd party libraries would fail when trying to run the app. -CJ
Quality Content my guy! ⌨️This is our world now. The world of the electron and the switch.💾 Keep bringing the heat.🔥 Absolutely loving these videos. Syntax hit the nail on the head when they picked you up!