Hosting a Docker Container on AWS EC2 Free Tier in under 12 minutes

แชร์
ฝัง
  • เผยแพร่เมื่อ 7 ก.พ. 2025
  • I walk through how to build and host docker containers on the AWS EC2 free tier. Link to the GitHub Flask docker repo shown in the video: github.com/vas...

ความคิดเห็น • 62

  • @biwanthabhanuka521
    @biwanthabhanuka521 หลายเดือนก่อน

    Struggling for days to find a proper tutorial online, but this guy is direct and saved me!

  • @adityagunjal7104
    @adityagunjal7104 6 หลายเดือนก่อน +11

    Rare chance you're reading this but this video was so helpful as a beginner, can't thank you enough ❤❤

  • @jorgeterence577
    @jorgeterence577 5 หลายเดือนก่อน +2

    As a complete beginner to AWS but experienced in programming in general, this video was a perfect fit. Thank you a lot! :)

  • @bhairavkedare9074
    @bhairavkedare9074 8 หลายเดือนก่อน +7

    i was today years old until i got to know using scp was best option to share files this easily !! great job!

  • @yawmintah1023
    @yawmintah1023 6 หลายเดือนก่อน +1

    You're a genius Vincent🤩❤. Incase having issues accessing through a different port, simply set to use port 80

  • @joetrades2472
    @joetrades2472 4 หลายเดือนก่อน

    Brother you literally saved my life!! I was kinda fucked, tried lots of options yours was the only one that worked. God bless you and your family. Btw, run sudo yum -y install docker

  • @GeorgeDonnelly
    @GeorgeDonnelly 11 หลายเดือนก่อน +5

    Straightforward, clear tutorial. This was really helpful, thanks. Subscribed.

  • @WorldCollections
    @WorldCollections 16 วันที่ผ่านมา

    Nice to hear there are other ways. Great tutorial.

  • @hahaok_
    @hahaok_ ปีที่แล้ว +17

    thank you so much for this upload! had to make one adjustment to be ablte to run it:
    apperently you install docker with this command now:
    sudo yum -y install docker

    • @najbighouse
      @najbighouse ปีที่แล้ว +1

      thanks!! wasn't able to do it with the sudo amazon-linux-extras install docker

    • @hahaok_
      @hahaok_ ปีที่แล้ว

      im glad i could help someone with my comment!
      @@najbighouse

    • @thanhannguyen2565
      @thanhannguyen2565 7 หลายเดือนก่อน

      thank you, you save my day

    • @giselletech
      @giselletech 4 หลายเดือนก่อน

      thank you!

  • @kevon217
    @kevon217 ปีที่แล้ว +3

    Great, quick tutorial. Really appreciate it.

  • @nickname8668
    @nickname8668 9 หลายเดือนก่อน +12

    Just curious, why cannot you dockerize the file locally and upload it to the ec2? I thought docker was supposed to be multi-platform and allow you to dockerize in a different environment?

    • @phucvu1924
      @phucvu1924 3 หลายเดือนก่อน

      same question, do you have any idea?

  • @jordanfox3782
    @jordanfox3782 ปีที่แล้ว +2

    thanks for the video. I wonder if you could give more details about why you chose to copy the dockerfile and build the image on your ec2, rather than pulling down the image from dockerhub or some other registry and running the container which I would have thought is way more usual approach.

    • @VincentStevenson
      @VincentStevenson  ปีที่แล้ว

      Good question - my main reason was to keep it on the free tier and stay simple enough for a relatively short video. But yes, for a more practical setup, using a container registry is better and I would do that.

  • @najbighouse
    @najbighouse ปีที่แล้ว +3

    what about doing this with docker-compose? which would be the steps for it?

  • @tintintintin576
    @tintintintin576 10 หลายเดือนก่อน

    this video helped me big time! thank you so much! :)

  • @ericferole7972
    @ericferole7972 ปีที่แล้ว +3

    Hi Vincent, Thank for you tutorial. Regarding the files you upload, let's say I have a Django project with many more files. How would you proceed? Thank you !

  • @testtest-c4z
    @testtest-c4z 4 หลายเดือนก่อน

    Very good video! I have a question for you, should the .php files or even an .env be in the same var/www/html folder or outside of it so that it is not accessible from the web? Should they be in another vpc? Thank you so much!

  • @geeekfa3278
    @geeekfa3278 ปีที่แล้ว +1

    You are awesome Vincent

  • @knunn552
    @knunn552 2 หลายเดือนก่อน

    I’m deploying a containerized app to AWS ECS using the awsvpc network mode, and I noticed a potential discrepancy between my local Docker setup and the ECS task definition. Locally, I use port mappings like 80:8080 (host:container), but in the ECS task definition, I plan to use 8080:8080 since awsvpc requires the host and container ports to match. Will this difference cause any connection issues when testing locally vs deploying to ECS? Also, is there a best practice for handling such port mapping differences between local and cloud environments?

  • @ravitejalam
    @ravitejalam ปีที่แล้ว +1

    Great video. I have a question. Why you didn't you use gunicorn and nginx?

  • @TheRFreyre
    @TheRFreyre ปีที่แล้ว +1

    Pretty cool. Thanks. Wouldn't cloning from github be easier?

  • @21Million
    @21Million 5 หลายเดือนก่อน

    My EC2 instance did not have the amazon-linux-extras on it. Gotta use regular yum install command.

  • @cooperfield45
    @cooperfield45 11 หลายเดือนก่อน

    very helpful tutorial! thanks man

  • @Ignited
    @Ignited 2 หลายเดือนก่อน

    Thank you very much for the tutorial! I was following along (on a windows11 device) and I have my dockerfile uploaded on the ec2 instance, however after I execute the docker run command, there is nothing in the results of sudo docker ps, neither does the ip with the opened port 80 lead to anything. Any idea what it could be?

  • @vicinaljordan
    @vicinaljordan 3 หลายเดือนก่อน

    Hello, i have a problem with my docker image. Now it kill itself and the last thing in the log is "killed". I read about it and it seem a ram problem. I'm using nginx and a docker image on my ec2. Is it correct that is probably a ram issue?

  • @midicine2114
    @midicine2114 4 หลายเดือนก่อน

    At what point would one introduce a web server like nginx or is that not needed?

  • @crucialthings8397
    @crucialthings8397 3 หลายเดือนก่อน

    Thanks a lot!❤

  • @nostalgia6669
    @nostalgia6669 3 หลายเดือนก่อน

    wow, amazing! thank you so much°!

  • @windws7137
    @windws7137 8 หลายเดือนก่อน

    Thank you, amazing tutorial, based

  • @uzzielperez4316
    @uzzielperez4316 ปีที่แล้ว

    Thanks very much for this!

  • @nicolassuarez2933
    @nicolassuarez2933 8 หลายเดือนก่อน

    Really strugling trying to atach a volume of 30gb to this instace, running out of space all the time., any tip?

  • @MyRonniej
    @MyRonniej 9 หลายเดือนก่อน

    hello new here was there a prerequisite video before this video explaining the terminal before you got started

  • @PeshelGomo
    @PeshelGomo ปีที่แล้ว

    Hey man. Thanks for this.

  • @krish4659
    @krish4659 11 หลายเดือนก่อน

    Thanks ! that was helpful

  • @anasouardini
    @anasouardini ปีที่แล้ว +11

    Be careful with that resource-hungry docker container.

    • @vinestervega19
      @vinestervega19 3 หลายเดือนก่อน

      Could you explain more?

  • @xinose2085
    @xinose2085 2 หลายเดือนก่อน

    What editor is that

  • @tomstalley3179
    @tomstalley3179 ปีที่แล้ว

    Thank you!

  • @eternalio1729
    @eternalio1729 ปีที่แล้ว +1

    hey what ide do you use?

  • @lillious
    @lillious หลายเดือนก่อน

    sudo: amazon-linux-extras: command not found
    damn that's crazy

  • @MisterRyanW
    @MisterRyanW 10 หลายเดือนก่อน

    Thank you!!!!!!!!

  • @mihirdutta-DPSi
    @mihirdutta-DPSi ปีที่แล้ว

    4:33 Change permission to avoid `sudo`

    • @muhammadhadziqrazin7213
      @muhammadhadziqrazin7213 ปีที่แล้ว

      yes and perhaps you should re-connect to the instance to make it works!

  • @saifeddinesassi2782
    @saifeddinesassi2782 ปีที่แล้ว +1

    I was charged around 0.1$ daily when it create the default VPC

    • @glitchbug3728
      @glitchbug3728 8 หลายเดือนก่อน

      its eip cost,release it

  • @thecloud5831
    @thecloud5831 หลายเดือนก่อน

    There are easier ways to do the deployement

  • @Nick-zw7gg
    @Nick-zw7gg 3 หลายเดือนก่อน

    Why don't you just sudo !!

  • @christoff124
    @christoff124 5 หลายเดือนก่อน

    scp keeps throwing an error when im trying to upload says the sytax you provided is incorrect

  • @windws7137
    @windws7137 9 หลายเดือนก่อน

    It builds a container but doesn't show up in the website address , how to fix it ?
    solution: docker kill $(docker ps -q)
    docker start -ai container_name
    or
    run a new one from image
    sudo docker run -d -p 80:3000 adguard/adguardhome

    • @windws7137
      @windws7137 9 หลายเดือนก่อน

      These are the commands
      sudo yum upgrade
      sudo amazon-linux-extras install docker -y
      sudo service docker start
      sudo usermod -a -G docker $USER
      Disable Systemd resolver:
      sudo systemctl stop systemd-resolved
      sudo systemctl disable systemd-resolved
      docker run --name adguardhome\
      --restart unless-stopped\
      -v /my/own/workdir:/opt/adguardhome/work\
      -v /my/own/confdir:/opt/adguardhome/conf\
      -p 53:53/tcp -p 53:53/udp\
      -p 67:67/udp\
      -p 80:80/tcp -p 443:443/tcp -p 443:443/udp -p 3000:3000/tcp\
      -p 853:853/tcp\
      -p 784:784/udp -p 853:853/udp -p 8853:8853/udp\
      -p 5443:5443/tcp -p 5443:5443/udp\
      -d adguard/adguardhome
      It doesn't show up int he IP address