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...
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
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
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?
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.
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.
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 !
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!
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?
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?
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?
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
Struggling for days to find a proper tutorial online, but this guy is direct and saved me!
I’m glad the video helped!
Rare chance you're reading this but this video was so helpful as a beginner, can't thank you enough ❤❤
Glad it helped!
As a complete beginner to AWS but experienced in programming in general, this video was a perfect fit. Thank you a lot! :)
i was today years old until i got to know using scp was best option to share files this easily !! great job!
You're a genius Vincent🤩❤. Incase having issues accessing through a different port, simply set to use port 80
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
Straightforward, clear tutorial. This was really helpful, thanks. Subscribed.
Nice to hear there are other ways. Great tutorial.
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
thanks!! wasn't able to do it with the sudo amazon-linux-extras install docker
im glad i could help someone with my comment!
@@najbighouse
thank you, you save my day
thank you!
Great, quick tutorial. Really appreciate it.
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?
same question, do you have any idea?
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.
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.
what about doing this with docker-compose? which would be the steps for it?
this video helped me big time! thank you so much! :)
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 !
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!
You are awesome Vincent
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?
Great video. I have a question. Why you didn't you use gunicorn and nginx?
Pretty cool. Thanks. Wouldn't cloning from github be easier?
My EC2 instance did not have the amazon-linux-extras on it. Gotta use regular yum install command.
very helpful tutorial! thanks man
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?
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?
At what point would one introduce a web server like nginx or is that not needed?
Thanks a lot!❤
wow, amazing! thank you so much°!
Thank you, amazing tutorial, based
Thanks very much for this!
Really strugling trying to atach a volume of 30gb to this instace, running out of space all the time., any tip?
hello new here was there a prerequisite video before this video explaining the terminal before you got started
Hey man. Thanks for this.
Thanks ! that was helpful
Be careful with that resource-hungry docker container.
Could you explain more?
What editor is that
Pycharm
Thank you!
hey what ide do you use?
pycharm
What themes?
sudo: amazon-linux-extras: command not found
damn that's crazy
Thank you!!!!!!!!
4:33 Change permission to avoid `sudo`
yes and perhaps you should re-connect to the instance to make it works!
I was charged around 0.1$ daily when it create the default VPC
its eip cost,release it
There are easier ways to do the deployement
Why don't you just sudo !!
scp keeps throwing an error when im trying to upload says the sytax you provided is incorrect
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
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