Instantly Create A Local Development Environment - Beginner To Pro

As a developer I've always found setting up local development environments extremely time consuming and quite frankly a hassle. This was always the case until Docker & Python/Flask came along!
In this video I explain why docker is so powerful and WHY you should use docker for all your local development requirement. In Addition, this video also explains how to create a local docker workspace or container and how to mange your entire docker environment.
On top of that, I also explain how to create a Public or Private Github repository in detail.
With that said, I also showcase how to create a local python & Flask app that runs your static HTML site.
What You Will Learn In This Video:
👉 Why Use Docker?: Discover the unmatched efficiency and ease Docker brings to local development setups.
👉 Step-by-Step Guide: I'll walk you through how to create a local Docker workspace, tailored for both beginners and experienced developers.
👉 Management Made Simple: Learn practical tips for managing and optimizing your Docker environment.
👉 Real-World Applications: See how Docker can be applied in actual development scenarios, making your workflow smoother and more efficient.
BONUS CONTENT:
🎥 Check Out Full Development Video - • Develop A Modern Websi...
🎥 Check Out Full Design Video - • Design A Modern Websit...
Timestamp:
00:00:00 Intro, Why Use Docker For Local Dev
00:02:29 Base Setup & Download Guide
00:05:25 How To Create & Manage Github Repos'
00:08:40 Cloning Github Repo To VS Code
00:11:27 Create Local Python & Flask Environment
00:16:22 Setup Src & Dist Folder Structure
00:18:03 Dockerfile Creation, Config & Run
00:21:04 Python & Flask Hosting Config
00:24:17 Map & Sync Docker With Local Repository
Command Lines For This Video:
1️⃣ Check Python Version: python -V
2️⃣ Check NodeJs Version: npm -v: C
3️⃣ Build Docker Container: docker build -t yogafitness .
4️⃣ Run Docker Container & Image: docker run -p 5000:5000 yogafitness
5️⃣ Prune All Dangling Docker Images: docker image prune
6️⃣ Run & Map Docker Container With Repo (Windows): docker run -p 5000:5000 -v ${PWD}/src:/app/src -v ${PWD}/app.py:/app/app/py yogafitness
7️⃣ Run & Map Docker Container With Repo (Mac/Linux): docker run -p 5000:5000 -v ${pwd}/src:/app/src -v ${pwd}/app.py:/app/app/py yogafitness
Resources & More:
🔑 My GitHub Repository for Docker Setup: github.com/JaquesBotha/YogaFi...
🔑 Figma Design Link: www.figma.com/community/file/...
🔑 Download & Install Docker: www.docker.com/products/docke...
🔑 Download & Install Node: nodejs.org/en/download
🔑 Download Vs Code: code.visualstudio.com/download
Stay Connected:
👍 If you find this video helpful, please give it a thumbs up.
💬 I'd love to hear your thoughts or questions in the comments.
🔔 Don't forget to subscribe and hit the bell for more - / @jcbcb
Thank you for watching!
#Docker #DevEnvironment #CodingTutorial #WebDevelopment #python #howto

Пікірлер: 11

  • @tjchatgptgoat
    @tjchatgptgoat26 күн бұрын

    BRUH!!!!!!!!!!THANK YOU!!!!! You confirm something my grandmother told me years ago "until you respect process of learning you will repeat the same grade over and over!" To anyone starting this software engineering journey - welcome to the process of learning!

  • @JCBCB

    @JCBCB

    7 күн бұрын

    Embrace the process of learning and you'll go far!

  • @isaacreyes4915
    @isaacreyes49156 ай бұрын

    Hello, I am currently attempting to learn Docker and been wondering how to do what you just did but for javascript/nodejs/react. Think I was able to understand most of it except the stuff near the end? What does mapping local repo to container do? In general, what is the proper workflow/way of combining Docker and git? Create repo and then create docker image? Then if I have to create a container based on a different computer, it will come with git integrated and I can just pull the latest version of the app? Would the above work if I am working on different computers? Then I can just create a new docker image if dependencies change? What would be the proper way to share images between computers?

  • @JCBCB

    @JCBCB

    6 ай бұрын

    Hi There! First off, thanks for watching my video, appreciate it. Now, I'll try my best to answer your questions from top to bottom. FYI, super valid questions might I add. Setting up Javascript and or NodeJs I do cover in the full course video which this video derives from, have a look and let me know kzread.info/dash/bejne/m2adxtVvkbKslNY.html. -------------------- 1. Docker and Git Workflow: The general workflow involving Docker and Git can vary based on project requirements, but a common approach is: 1.1 Initialize a Git Repository: Start by creating your project and initializing a Git repository. This allows you to track changes in your codebase as done in this video. 1.2 Develop and Commit Changes: As you develop your application, regularly commit changes to your Git repository. As I've shown in the larger video. This part it crutial! 1.3 Create a Dockerfile: The dockerfile is where it's all at! This file specifies the base image, dependencies, and steps to set up your application environment. In essence this is the main docker config file. 1.4 Build Docker Image: Once your Dockerfile is ready, use Docker commands to build an image of your application. This image can be built on any computer where Docker is installed. So make sure to have docker desktop installed on your other computers and just do a Git Pull to get that dockerfile. 2. Mapping Local Repo to Container: When you map your local repository to a Docker container, it essentially means you're creating a link between a directory on your host machine (your local repo) and a directory in the Docker container. This is typically done using volume mounts in Docker. The advantage of this setup is that any changes you make in your local repository are immediately reflected inside the container. This is particularly useful for development environments where you need to see changes in real-time. 3. Creating Containers on Different Computers: If you need to work on different computers, you can indeed pull the latest version of your application from Git and then create a Docker container. The beauty of Docker is that it ensures consistency across different environments. As long as the Dockerfile is set up correctly, the container should behave the same way on any machine. 4. Handling Dependency Changes: If your application's dependencies change, you would update your Dockerfile accordingly and rebuild the Docker image. This new image would then be used to create containers that include the updated dependencies. 5. Sharing Images Between Computers: To share Docker images between computers, you can use a Docker registry, like Docker Hub. You can push your Docker image to the registry and then pull it from any other computer. This is a common practice for distributing Docker images across different environments or team members. Have a look at the full course video and let me know what you think. I'm planning on doing a full ReactJS and Blazor video soon where I breakdown how to effectively spin up a local environment and dev on it. Side note, I also show how to create a Webpack environment which is quite handy when it comes to Javascript management. Hope this helps! Feel free to reach out if you have more questions or need clarification on any of these points. Keep experimenting and happy coding!

  • @isaacreyes4915

    @isaacreyes4915

    6 ай бұрын

    @@JCBCB Thank you! Really appreciate you taking the time to reply!!! Haven't touched Flask in a bit but I'll try to follow along. Thanks again!

  • @Zackkeddy-dark
    @Zackkeddy-dark6 ай бұрын

    Thankyou❤

  • @JCBCB

    @JCBCB

    6 ай бұрын

    Thank you Zack

  • @josersleal
    @josersleal5 ай бұрын

    its a local dev env not a docker dev env. just use dev containers and no need to install anything locally except for vscode. thi was a waste of 1 minute

  • @JCBCB

    @JCBCB

    5 ай бұрын

    Thanks for your comment! You make a good point about using dev containers with VSCode for a local development environment. This video is aimed at beginners, and I wanted to thoroughly explain the basics before introducing more advanced concepts like dev containers. Stay tuned for future videos where I’ll delve into more complex setups. Your feedback is appreciated and helps shape the content for all skill levels.