Build YOUR OWN Dockerfile, Image, and Container - Docker Tutorial

Поделиться
HTML-код
  • Опубликовано: 1 окт 2024

Комментарии • 246

  • @TechnoTim
    @TechnoTim  2 года назад +55

    Have you built your down Docker container yet?

    • @barisgunduz
      @barisgunduz 2 года назад +2

      Building soon. Thanks again.

    • @lucasdealmeidacarotta3174
      @lucasdealmeidacarotta3174 2 года назад +1

      Yes and I do prefer to do so especially to avoid any crypto mining packages from a third-party image. Two things that I think are cool to share about it in the next video is about the tag USER -- it took me a while to find out about it -- and Docker's buildx -- especially for developers that use SBC as their homelab -- as do I.

    • @quinnhenry6719
      @quinnhenry6719 2 года назад +7

      I was actually working on figuring out a quick little Nginx container for a school project, and this is SOO much simpler than other tutorials I found online, plus you just plain explain thing beautifully. Your videos are just amazing!

    • @TechnoTim
      @TechnoTim  2 года назад +2

      @@quinnhenry6719 Thank you so much!

    • @Maliuta
      @Maliuta 2 года назад +1

      I have avoided containers for a long time now. But I am having to face the fact that I for some things I no longer have an option but to run them as containers - and some of those tools want me to build my own docker images.
      I was wondering what tool you are using to create your docker files - it has some sort of integration with docker hub, and auto completion (both features I could use, as I don't intend building docker images to be a main part of what I do).

  • @kevineugenius
    @kevineugenius 2 года назад +63

    Thank you so much for NOT starting this with "here's how to download docker, here's how to install docker".

  • @TheRagingDonut
    @TheRagingDonut 2 года назад +40

    This timing is legendary. I just started looking into using containers for my setup and the first video i see is this one. Awesome vid btw, just what i needed

    • @Clarence-Homelab
      @Clarence-Homelab 2 года назад

      Couldn't agree more about the timing. Although I have been using docker for over a year I only recently built my first docker image which is a clone of wordle and also happens to be based on nginx-alpine. 😃

  • @usimian
    @usimian Год назад +16

    Wow, what a great tutorial. In less than 20 minutes you explained what others would have taken hours. Thank you!

  • @Telorand1
    @Telorand1 Месяц назад +2

    Still relevant and useful two years later. I feel like I can do this, now. LFG!

  • @denniskluytmans
    @denniskluytmans 2 года назад +10

    Awesome!! Exactly what I needed. You sir, are a legend

  • @yashsolanki069
    @yashsolanki069 2 года назад +9

    Your teaching style is great!
    Would love to see more from you🙌

  • @tintincr1
    @tintincr1 7 месяцев назад +4

    I just wanted to drop you a quick note to express my appreciation for the fantastic video tutorial you created. Your clear explanations and step-by-step guidance made learning 'Docker containers' a breeze!

  • @MrConcord75
    @MrConcord75 2 года назад +5

    Omg. You’re video was amazing. So easy to follow and understand. I think I learned more about docker from you than multiple other videos. Thank you!

  • @GSquaredOG
    @GSquaredOG 2 года назад +8

    Great video! Id love to see a similar video detailing containers and storage. Like covering the different options that are available to persist data.

  • @5urg3x
    @5urg3x Год назад +3

    Bro this video is amazing. I just discovered Docker a few weeks ago, I had always just used Virtual Box or VMWare VMs. I figured out how to spin up a Unifi container pretty quickly, but what I really wanted to know was how to build my own container so I could do some custom things. This video tutorial is perfect!!

  • @Electrowave
    @Electrowave 7 месяцев назад +2

    This is the first video on docker that I have watched that makes sense of docker for me, in a way I can understand. Thank you so much! Now I'm going to attempt my first container 🙂

  • @DFsdf3443d
    @DFsdf3443d Год назад +10

    finally an actual practical tutorial that doesn't spend 90% of the time just explaining a bunch of boilerplate things like how to install it & what containers even are.

  • @grundgaenger
    @grundgaenger 2 года назад +1

    Thank you for all your videos. I was able to learn a lot from your work and videos and it would have been much harder to read books and documentation instead.
    I often see you in your videos typing code into VS Code and "magically" completing "things". Perhaps you can briefly explain at this point which VS extensions you installed and why? Or is it even worth making your own video for it?
    I hope you have fun making videos like this for a long time to come.

  • @rukbook
    @rukbook Год назад +2

    Man this tutorial is super awsome and beginner-friendly. The presentation style is awesome - to the point and just the enough amount of info in one video. Thanks a lot!

  • @MrDalholm
    @MrDalholm 2 года назад +1

    Great video Tim..
    Could you perhaps do a follow-up on the CI part?

  • @danielyrovas
    @danielyrovas 2 года назад +1

    Looking forward to the container registry video,
    I currently use Gitea with Woodpecker to run CI pipelines, but it is very slow when I need install dependencies before it runs my code, it would be great to pull from my own container registry that already includes all the build tools I need.

  • @tzgardner
    @tzgardner Месяц назад

    Great tutorial! I had a question about the starting point FROM in a Dockerfile. You mentioned you can start with a Linux operating system but you could also start with FROM python. Just wondering what the implications are for your starting point. Like, you wouldn't be able to run your web server if you started with Python? Or does it assume a native OS?

  • @longrolstral
    @longrolstral 7 месяцев назад

    Great video. Thanks.
    I have discovered that running an image using a Dockerfile from Docker Hub, with only the '-d' flag, does not always create a container that stays up and running. I've had to run the image with '-dit' to create the container(s).
    Also, some images don't run to create the container if a command (CMD in Dockerfile) is missing.

  • @benjohnson9747
    @benjohnson9747 Год назад

    Clear and concise. Though I couldn’t get intellisense to work with the FROM command. Where your video has intellisense suggesting available repos after the FROM command.

  • @Erik-fg9fk
    @Erik-fg9fk 7 месяцев назад

    What should i do if i only see my html documents on my website not my java script files or css files? I have linked my whole folder and if i run my code locally (not on docker) i see those css editing and java script.

  • @adjuxnt
    @adjuxnt 2 года назад +1

    I think this tutorial was really awesome. Thank you! I followed along and tried all the things while watching. Didn't bother building such a fancy web page tho xD mine was just a hello world, but you got the point across neatly!

  • @Aza.dChaiwala
    @Aza.dChaiwala Месяц назад

    In docker file I used the same copy command as you did
    COPY src/html usr/share/nginx/html but when I cat into dockerfile the copy is empty...how can check the destination path in my local host to confirm if it is the same as urs as it could be the possible issue..thanks

  • @brunekxxx91
    @brunekxxx91 3 месяца назад

    Yeah, after using docker for many years. Only now do i see how actually POWERFUL it is once you actually get to building your own containers

  • @martin_kuchar
    @martin_kuchar Год назад

    Hello, please which dockerfile VSC plugin offers image version numbers in FROM section?

  • @SirRandallDoesStuff
    @SirRandallDoesStuff 2 года назад +1

    Love your channel but I hate your terminal setup. While this might work for you and I can follow what you are doing but most people won't. Having a profile with the full path will be very helpful for people following along. This is just constructive criticism. Your channel is amazing and learned a lot from it.

    • @TechnoTim
      @TechnoTim  2 года назад

      Thanks for the feedback! Not sure I understand what you mean about having a profile with the path and how most people won’t be able to follow? These are just docker commands.

    • @jackmurak
      @jackmurak Год назад

      @@TechnoTim I get path errors (others below did too). It might be windows vs. linux issue for me?

  • @joeharyar9873
    @joeharyar9873 Год назад

    Hi...great tutorial... I understand now K8s only support containerd as runtime interface, so can I still run dockerfile in that K8s? Hope someone can clarify further. Thanks

  • @varun1033
    @varun1033 17 дней назад

    Bro my localhost is stuck on nginx welcome page who do I redirect it to index.html please somebody help.😥😥😥

  • @thomasgiblin4700
    @thomasgiblin4700 2 года назад

    had a nightmare getting this working on windows 10 home os. Had to enable windows hypervisor platform in windows features then restart Docker. Then stop my default IIS site which was running on port 80. Finally also found the browser was caching web requests from before I had my system setup properly so had to clear manually go in and clear the browser cache. Hoping this will help someone else go through less pain in future!

  • @vanopiano
    @vanopiano 2 года назад +1

    Thank you for this video with explanation

  • @Vinnie64
    @Vinnie64 Год назад

    So if I have an image I got online, do I need to worry about the compose file? or can I just run the image and set env variables?

  • @jimmycomet515
    @jimmycomet515 Год назад

    question, instead of creating docker file and new custom docker image, could we creare docker-compose with the ngix image or apache etc and volume the _site folder ?
    Does this work ?

  • @SilentKoala
    @SilentKoala 2 года назад +1

    I've watched literally dozens of videos about Docker on YT and found them confusing and lacking. This video is awesome and explains it all. Would recommend.

  • @betterstack
    @betterstack 6 месяцев назад

    Great job with the tutorial Tim! 🚀If anyone’s looking for more Docker videos, we’ve released a web-based Docker viewer and a logging tutorial to help the community too 💪

  • @alexplaytop
    @alexplaytop 7 месяцев назад

    Techno Tim - you are man and good tutor! THX ALOT!!!

  • @mikegbow4203
    @mikegbow4203 2 года назад +1

    DUDE thank you! I've been looking for a video like this that starts from the beginning and does a simple example that's easy to follow. Usually the videos all show these big applications that they are wanting to containerize and it can be hard for a beginner to follow along.

  • @coletraintechgames2932
    @coletraintechgames2932 2 года назад +2

    Very good my man. Loved this sort of thing!
    Just great overall stuff... Please do more along these lines. I can tell you were "right at home" with this stuff, but it was so good for me. So good, thank you.

  • @Chris-op7yt
    @Chris-op7yt Год назад

    how do i make a docker container for etlegacy? i want the client, not a dedicated server.
    Have both official compiled release and git clone in build environment, on windows.

  • @galnadjar
    @galnadjar Год назад

    great explanation, very helpfull , like and subscribed

  • @RinoMoen-xy6sg
    @RinoMoen-xy6sg Год назад

    Wish you corrected yourself when you said ID for the image that was running for the exec command

  • @eidercafe
    @eidercafe 7 месяцев назад

    Is this theoretically how someone could host a public website at home? For instance an artist portfolio or a wedding website?

  • @mheys1
    @mheys1 2 года назад

    I added the following to my aliases so I can just spin up test containers if I want to test a command or console app. Use host networking so I don't need to figure out the port forwarding every time, people should make their own decision on that.
    shell-alpine='docker run --name alpine --rm -it --network=host -v "$(pwd)":/root alpine /bin/ash'
    shell-busybox='docker run --name busybox --rm -it --network=host -v "$(pwd)":/root busybox'
    shell-centos7='docker run --name centos7 --rm -it --network=host -v "$(pwd)":/root centos:centos7 /bin/bash'
    shell-centos8='docker run --name centos8 --rm -it --network=host -v "$(pwd)":/root centos:centos8 /bin/bash'
    shell-ubuntu-1804='docker run --name ubuntu-1804 --rm -it --network=host -v "$(pwd)":/root ubuntu:18.04 /bin/bash'
    shell-ubuntu-2004='docker run --name ubuntu-2004 --rm -it --network=host -v "$(pwd)":/root ubuntu:20.04 /bin/bash'

  • @clarkkentgwapo1
    @clarkkentgwapo1 2 года назад

    How we connect mysql and php using docker? For database

  • @rohitbuchake
    @rohitbuchake 2 года назад

    Because of your Video, I have solve most of the issue, for that Request you please create deep details video for proxmox container

  • @stefanbogdanovic590
    @stefanbogdanovic590 2 года назад +1

    Your videos are phenomenal, yesterday I started looking at Ansible on your channel and made me wanna learn Devops (Ansible and Docker). Thank you so much, your explanations are by far the best on YT. Thank you once again, all the best! 😄

    • @TechnoTim
      @TechnoTim  2 года назад +1

      Glad you like them! Thank you so much!

  • @sridharvaishnava9003
    @sridharvaishnava9003 Год назад

    10:47 If we only exposed the port 80 how did it work for port 8080 ??
    shouldn't we have exposed the port 8080 ?

  • @DubbinTV
    @DubbinTV 7 месяцев назад

    Tech noob here, I'm having trouble with finding the page he was on with the CLI

  • @devohnmitchell
    @devohnmitchell 2 месяца назад

    I tried following the instructions on the Docker Website and on other Tech Manuals and it didn't make since. But this Worked..Thank you sir..!!
    💯💯💯💯

  • @JonathanRobert23
    @JonathanRobert23 2 года назад +1

    Thank you Tim for an amazing video once again! Addition to this can you cover SSL for docker containers be cover in your next video if possible or else a link to a super simple guide would do it. 😊

    • @TechnoTim
      @TechnoTim  2 года назад

      Already did :) ruclips.net/video/liV3c9m_OX8/видео.html

  • @Marco-zb7wf
    @Marco-zb7wf Год назад +1

    Gold standard content. Thank you

  • @tahsin1414
    @tahsin1414 Год назад +1

    I was getting an error while building the image. I solved it by
    COPY ./src/html /usr/share/nginx/html

    • @jackmurak
      @jackmurak Год назад

      I'm getting a path error, is that what you got too? Are you on windows?

    • @tahsin1414
      @tahsin1414 Год назад

      @@jackmurak I was using the mac with m1 processor. The mac m1 has been showing many problems in docker, so I am just practising the docker in a Linux machine.

  • @andrewtortillas6328
    @andrewtortillas6328 9 месяцев назад

    When I run docker build . it says it cannot load the metadata for nginx, how can I fix that?

  • @devviz
    @devviz 2 года назад

    11:47 how can i move your rectangular shape to the upper right of the screen to see whats after the created attribute "2 minutes..." something ??

  • @mattschwartz5982
    @mattschwartz5982 Год назад

    What extension are you using with visual studio code to write your Dockerfile?

  • @Doesntcompute2k
    @Doesntcompute2k 2 года назад +1

    Another GREATI video! I love your tutorials. You started out with really "good" content (I've watched from day one), but now, it's at a much higher-level. This tutorial with your direct, to-the-point explanations, really helped me. I've tossed up Docker and K8s but the amount of notes I have is overwhelming. Especially when I want to spend five minutes and not five hours. I set this to over 100 contacts at work, and about 180 (I forget the number in the email group) at home. Programming friends who like similar content.
    Keep up the great job! (Now rewatching "Uptime Kuma" video to get it working in my new K8s.)

    • @TechnoTim
      @TechnoTim  2 года назад +1

      Thank you so much! Recommending my channel to friends helps more than you know and I really appreciate it!

  • @Krushx0
    @Krushx0 2 года назад +1

    Great video. What i would liked to see is how can you integrate other things like keepalived into this or any other base image to be up to date always automatically , let it be the base iamge or keepalived while retaining the config files.

  • @Mr.AhmedAlzeidi
    @Mr.AhmedAlzeidi 2 года назад

    Hi , this is very useful for me ... thank you very much I'm using this tutorial to improve my self with docker projects ..

  • @hectorherrera4193
    @hectorherrera4193 Год назад

    Muy buena explicacion... Estoy empezando con dockers y este ayuda mucho. Gracias x compartir

  • @balub778
    @balub778 2 года назад +1

    I was just about to start a course on udemy for docker, I feel I can avoid 4+ hours in that course with this one video of yours. Now if you could make one like this for docker swarm or kubernetes it would be amazing.

    • @vanopiano
      @vanopiano 2 года назад +1

      swarm and kubernetes are completely different, I propose to start with swarm if you want to make some high availability between your home services and few physical machines

  • @mikekadar3325
    @mikekadar3325 2 года назад +1

    Nicely done. Lots of help in one place, with end to end examples, in pretty much no time at all. Thanks!

  • @zr0gravity
    @zr0gravity 2 года назад

    Dockerhub shows 1.21.6-alpine and 1.22.0-alpine in your video. I even see this now when I visit Dockerhub. How did you determine that 1.10.1 was the latest version? Is there a tag that I'm not seeing? Is there maybe a docker command I can use to query for the lastest versions of base images?

  • @patrickprucha5522
    @patrickprucha5522 Год назад

    Actually its rather easier. Now i have 4 images that i use to test my scripts or to mess around with and it took very little time to setup. I couldn't find a good example for building a dockerfile, but will in the long term. I think in the end dockerfile is the way to go. However, what i did was collected a folder with all my scripts and stuff, and created some scripts to setup my environment, which included downloading cli apps like nano, tmux, vim (to practice), wget, curl and mc. Then i copy my dotfiles to /root, and then source the new .bashrc, and voila, a perfectly (for my use) docker container!! excellent!!!!

  • @ryheinz9544
    @ryheinz9544 2 года назад

    Wow!..Thanks so much for this video! It was the best explanation I have found! I really learned alot!...Thanks again.

  • @matthewdavis2475
    @matthewdavis2475 4 месяца назад

    Definitely agreed with all the other comments, great tutorial and a lot of gems worth diving deeper on outside of this video.
    3 improvements IMO - 5 to 10 seconds without wasting time
    1 - mention the OS you're on
    2 - mention the installer of Docker you used
    3 - actually show the Dockerfile being created so it's clear about file extension
    I'm seeing the bigger picture more and more now.

  • @magicmanj32
    @magicmanj32 11 месяцев назад

    Thanks Tim, very informative, I cam to learn how to docker build but got alot more useful info ,thanks

    • @TechnoTim
      @TechnoTim  11 месяцев назад

      Glad you enjoyed it

  • @stayupthetree
    @stayupthetree 7 месяцев назад

    see my vs-code doesnt perform the same way as I type, what am I missing?

  • @aleterra
    @aleterra 2 года назад

    It didn't run on my machine :( I cannot make nginx listen to any port.

  • @jeffschowe5606
    @jeffschowe5606 Год назад

    Thank you Johnny Depp for teaching me Docker.

  • @moeintaherkhani7289
    @moeintaherkhani7289 4 месяца назад

    Best Docker tutorial by Johnny Depp

  • @domijantas481
    @domijantas481 10 месяцев назад

    Fantastic content, greatly explained and so clear. Thank you and keep going. you just have a new subscriber :D

  • @TAP7a
    @TAP7a 2 года назад

    Alpine is also all BSD/MIT licensed apart from the kernel, isn't it? Or am I getting it mixed up with another distro?

  • @johnkmoore99
    @johnkmoore99 7 месяцев назад

    I did! Well done video, I probably won't need to be building my own containers much but had a special case, need to set up a quick web server to test something. Video was great! Oddly probably the most useful thing for me in the video was "exec into a container". I only knew how to do that from portainer and it wasn't working on one container but through this command in docker I was able to do it!

  • @kermitdafrog8
    @kermitdafrog8 10 месяцев назад

    Did you ever do a video on putting your docker image on to the Docker Hub?

  • @Ericb1957
    @Ericb1957 8 месяцев назад

    Thanks for this - I had no idea how to do anything but copy paste stuff for docker/portainer this morning. Followed this then a few hours later have managed to get automated builds from Github to Dockerhub, and then deployment from there to my home server for easy iteration!

  • @kebab-case
    @kebab-case 2 года назад

    This is an awesome tutorial! You simplified the process of learning Dockerfiles.
    I wish this video existed when I was learning docker.
    Would you make a video on Docker Compose and deployment to Kubernetes?

  • @lcch9755
    @lcch9755 2 года назад

    You just saved my a$$ bro!!! Thanks a lot

  • @nguyenminh15988
    @nguyenminh15988 2 года назад

    Nice video!
    Hope you have k8s video ^^

  • @sonnix31
    @sonnix31 2 года назад

    Really very cool explanation. Will be checking out your content. Thanks man!

  • @rishikadas9032
    @rishikadas9032 Год назад

    Hi nicely put together in few minutes. Nice...

  • @Chadminus
    @Chadminus Год назад

    ey yo we have Johnny Depp here on a glass high caff coffee . respects sire

  • @cassiuslives4807
    @cassiuslives4807 9 месяцев назад

    Thanks, I learned something!

  • @lakshminarasimmanv
    @lakshminarasimmanv 2 года назад

    Hi techno tim. I love all your videos. Can you please make a video on creating docker swam and deploying traefik and portainer on it?

  • @svenrissmann
    @svenrissmann Год назад

    /usr is not „user“. Its for „Unix System resources“

  • @sneffetsd
    @sneffetsd 10 месяцев назад

    How to use the build image in other place?

  • @ryanmalone2681
    @ryanmalone2681 4 месяца назад

    I don't understand how you even created the yaml file at the beginning as there is no option when I downloaded VS Code, how to got it to the server from your client, and how to converted the yaml file into a Docker file. Missed a lot of steps there.

    • @TechnoTim
      @TechnoTim  3 месяца назад +1

      Just do file>new text file then name it “Dockerfile”

  • @abiodunibrahim3340
    @abiodunibrahim3340 2 года назад

    This is an interesting video I must say. Interested in how images are being pushed to the container registry and Azure app services.

  • @devinbartley5768
    @devinbartley5768 2 месяца назад

    Thanks, this was pretty simple.

  • @wahibakamoulcode
    @wahibakamoulcode 2 года назад

    really loved ur video

  • @ChristopherCordero-up7xq
    @ChristopherCordero-up7xq Год назад

    bro what camera did you use??????

  • @mohideenabdulkadhar4280
    @mohideenabdulkadhar4280 5 месяцев назад

    It is helpful. thank you

  • @NazarRud
    @NazarRud 2 года назад

    Yep, It was simple enough and useful for me. Thanks

  • @oleksandrburkhan3277
    @oleksandrburkhan3277 Год назад

    Thank you! I've created my own docker container!

  • @drjones694
    @drjones694 Год назад

    Thank you !!!

  • @nellieetnini77
    @nellieetnini77 Год назад

    hi, my text in the html file is not showing on web browser after port mapping....need help asap please

    • @leeranaldo9979
      @leeranaldo9979 Год назад

      Had the same problem. In that first row in your dockerfile remove everything after FROM nginx and it should work.

  • @kirankumarsukumar
    @kirankumarsukumar 2 года назад

    Im not able to find the link to github in the documentation link. Can you send me a link if you can ?. Thanks again.

    • @TechnoTim
      @TechnoTim  2 года назад

      docs.technotim.live/posts/custom-docker-image/

  • @mirkalaa
    @mirkalaa Год назад

    great tutorial, thank you ❤🪄

  • @Deezeone
    @Deezeone 2 года назад

    Is it possible to make my own streaming music docker container.?

    • @TechnoTim
      @TechnoTim  2 года назад

      Sure, anything is possible that you can do on a server or desktop

  • @TechySpeaking
    @TechySpeaking 2 года назад

    First

  • @angelosalexiou
    @angelosalexiou 2 года назад

    Thanks for the video! Maybe the best introductory video for docker!

  • @seanthomson23
    @seanthomson23 2 года назад

    When I type "From" in my Dockerfile, it doesn't offer image suggestions (or underline the correct image name) what does that mean? How do I set it up correctly?

    • @TechnoTim
      @TechnoTim  2 года назад

      Install the docker extension in vscode!

    • @seanthomson23
      @seanthomson23 2 года назад

      @@TechnoTim my God i hate myself.. Thank you!