Apache, PHP & MySQL with Docker

แชร์
ฝัง
  • เผยแพร่เมื่อ 2 พ.ย. 2024

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

  • @Xxxxxxxxxx12870
    @Xxxxxxxxxx12870 4 ปีที่แล้ว +8

    This is the perfect tutorial for beginners. It gives the clear concept of docker for starters like me. Thank you very much!!

  • @josefreiter8451
    @josefreiter8451 2 ปีที่แล้ว

    With this video you managed to explain the abstract docker technology in a simple and understandable way. As far as I know you have presented more or less all the essential concepts of Docker. great presentation!

    • @NevyanNeykov
      @NevyanNeykov  2 ปีที่แล้ว

      Thank you very much! I am glad you've appreciated it . My goal was to achieve practical working environment for web development using Docker.

  • @MarcMcRae
    @MarcMcRae 2 ปีที่แล้ว

    Been looking for something like this for AGES! Super clear explanation which worked & answers SO many questions I had trying to move from old-style-VM-dev to docker/docker-compose. Nice one!

    • @NevyanNeykov
      @NevyanNeykov  2 ปีที่แล้ว

      I am very pleased with your comment, appreciated ! :) For improved performance you can also try Podman for web development.

  • @Seedlinux
    @Seedlinux 4 ปีที่แล้ว +12

    Excellent tutorial, this is what I was looking for, thank you!

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

      Thank you very much :) feeling the support :)

  • @arielpasilang7173
    @arielpasilang7173 2 ปีที่แล้ว

    This is exactly what I need. Better than the online course that I took.

    • @NevyanNeykov
      @NevyanNeykov  2 ปีที่แล้ว

      Thank you for the comment ! I put much effort into creating it :)

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

    Hello, Nevyan!
    I just wanted to thank you for your EXCELLENT tutorial.
    This video is exactly what I was looking for! I wanted to connect PHP with MySQL through Docker (using "docker-compose") because I'd decided to learn PHP but I didn't want to install it on my PC.
    Congrats!

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

      Thank you Lucas, for your feedback! It is well appreciated :)

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

    Thanks Dear SIr... Great tutorial.. Love from India

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      Thank you for your appreciation! :)

  • @geraldhoarau6509
    @geraldhoarau6509 3 ปีที่แล้ว

    Very nice tutorial, I could finally get an apache server running with docker. Thank you very much!

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

      I am glad you made it. Exploring docker is a learning experience.

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

    Very nice it really helped me understand the concepts and how all these pieces fit together. thank you very much

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      I am glad the information helped you to apply the concepts in practice!

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

    Thank you so much for the tutorial. I did the same but with mariadb in a rpi 4 and works perfectly.

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      I am glad it helped along your journey !

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      by the way raspberry pie is nice solution for web hosting :)

  • @عثمانلیطورونی-ظ7ب
    @عثمانلیطورونی-ظ7ب 4 ปีที่แล้ว +1

    Excellent tutorial, very clear and just works, thank you very much.

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      Thank you, I feel very good when receiving positive feedback on my work :)

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

    I am using windows 10
    I am gettinhg this error any ways to solve it...
    "#0 20.32 E: Unable to fetch some archives, maybe run apt-get update or try with --fix-missing?
    ------
    failed to solve: executor failed running [/bin/sh -c apt-get update && apt-get upgrade -y]: exit code: 100"
    Please help me. Thankyou.....

    • @NevyanNeykov
      @NevyanNeykov  2 ปีที่แล้ว

      apparently you have some problems with the internet, either try first: ping google.com to see if it shows proper output, then try running in command prompt of ubuntu: sudo apt update && sudo apt dist-upgrade
      please also check here the answers: stackoverflow.com/questions/38002543/apt-get-update-returned-a-non-zero-code-100

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

    THANK YOU, you are a life save....the tutorial was awsome

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

      I am pleased to hear this :) there is so much to learn about docker when developing web applications .

  • @jig1056
    @jig1056 2 ปีที่แล้ว

    This is exactly what I needed. An excellent tutorial, thank you so much.

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

    Good explanation , love from kerala

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

      Thank you:) sometimes probably to visit:)

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

    Thanks, this help with docker container, soon in production

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

      ready for production, way better than a sandbox :)

  • @jonathanhoyos8191
    @jonathanhoyos8191 2 ปีที่แล้ว

    Please create a membership for your channel. Your explanations are so usefull. And maybe we would like to ask some techonlogy to be teached by you

    • @NevyanNeykov
      @NevyanNeykov  2 ปีที่แล้ว

      That's a great idea! Thank you :)

    • @NevyanNeykov
      @NevyanNeykov  2 ปีที่แล้ว

      here is the membership link: th-cam.com/channels/69XQPDbEpfAtO5S2-ZyNoA.htmljoin

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

    Excellent run through.

  • @optimusdebugger9638
    @optimusdebugger9638 5 ปีที่แล้ว +4

    ctrl+l to clear screen. I find it more useful.
    Nice work by the way

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

      yes, thanks, nice shortcut :)

    • @YogiGhorecha
      @YogiGhorecha 5 ปีที่แล้ว

      Nice shortcut Man, THANKS!!!!

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

    Благодаря за чудесното видео!

  • @wongjeremy1362
    @wongjeremy1362 4 ปีที่แล้ว

    Thank you sir and i had spent my whole day on this 20-minute video

  • @andrewkorneychuk586
    @andrewkorneychuk586 3 ปีที่แล้ว

    Very good tutorial. Clear and concise. Thank u sir. Also a small correction 4:25 its not docker version its compose file version.

  • @niinoocode
    @niinoocode 2 ปีที่แล้ว

    This video is very nice, because I am need to learn docker

  • @周安迪-n3e
    @周安迪-n3e 5 ปีที่แล้ว

    thanks, it really help me since I never used docker and php before

  • @saidbakr
    @saidbakr 2 ปีที่แล้ว

    Unfortunately, there is no any Docker's tutorial tells us what is next?! In other words, what can I do if I want to distribute, backing up or migrate these Docker's stacks to another machine. In that case, I have my code and the database data beside the environment, what can I do to make them run on any machine by simple command(s)?

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

      Hi Said,
      you can use public or create private registry, and when ready with your images, containing your code you can push them to the registry, and use them from anywhere once you pass an authentication.
      For the databases you can create and link separate volumes(disk drives,folders, etc) to the container, residing on a specific machine or using cloud virtual machines, again accessible from anywhere. Anyway nice ideas for a new video :)

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

    just awesome ...God Bless youuu, it was very helpful .

  • @AkashSharma-ly6dw
    @AkashSharma-ly6dw 3 ปีที่แล้ว

    Very well explained! thanks for sharing!

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

      Glad you enjoyed it!

    • @AkashSharma-ly6dw
      @AkashSharma-ly6dw 3 ปีที่แล้ว

      @@NevyanNeykov yes, I really enjoyed it. I am a senior web developer in India!

    • @NevyanNeykov
      @NevyanNeykov  3 ปีที่แล้ว

      good :)

  • @brurytangkere4874
    @brurytangkere4874 3 ปีที่แล้ว

    Hi, just quick ask, if we build app with docker and we separate container for mysql, Apache, php, it will have a different IP adress ?

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

      containers will share the same default network, unless you specify different networks within docker-compose.

  • @awaiskhan28
    @awaiskhan28 5 ปีที่แล้ว

    Nice tutorial explained many things. God Bless you!

  • @SahilRana-nw7yd
    @SahilRana-nw7yd 3 ปีที่แล้ว

    Thanks for the tutorial sir but i have a question as you have made this simple lamp how can i push this whole lamp container to my docker hub?

    • @NevyanNeykov
      @NevyanNeykov  3 ปีที่แล้ว

      you can easily publish to dockerhub using this guide: docs.docker.com/docker-hub/

  • @antonioastorino7488
    @antonioastorino7488 4 ปีที่แล้ว

    Great tutorial. How did you select the PHP tag at around 7:21? There are really a lot and don't make much sense to me. Thank you in advance for your help.

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

      You can choose appropriate tag by clicking on the TAGS tab, there you will find different images offering variations of the php language such as: alpine, fpm, cli, apache. Each of them can be useful for specific development / production purposes. In the main php dockerhub page under section variants you can learn how they differ from each other.

    • @antonioastorino7488
      @antonioastorino7488 4 ปีที่แล้ว

      ​@@NevyanNeykov Thanks a lot for the prompt reply and the info! I will look into it!

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      You are welcome :)

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

    браво тигър .

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

    A huge thank you for this !

  • @raphaelcabral5244
    @raphaelcabral5244 5 ปีที่แล้ว

    Nice tutorial! Works fine here! Thanks!

    • @NevyanNeykov
      @NevyanNeykov  5 ปีที่แล้ว

      great that it worked for you !

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

    Good tutorial bro !

  • @МаксимФалилеев-я5ш
    @МаксимФалилеев-я5ш 4 ปีที่แล้ว

    Хороший туториал, привет из России/ good toturial, hello from Russia :)

  • @666zulett
    @666zulett 5 ปีที่แล้ว +1

    great tutorial, i have a question:
    is it necessary to have apache, php and mysql installed natively in ubuntu for this container to function?

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

      no need, they will be installed inside of the sandboxed (docker) environment.

  • @socialwebwiki
    @socialwebwiki 4 ปีที่แล้ว

    Hi. Awesome video. How I could add phpmyadmin. would it be another container?!

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

      It is good if you have another container running phpmyadmin. It has the benefit of not interfering with your other application container. This way you can scale the main application, without scaling the phpmyadmin (as if they were on the same container). Decoupling of application logic also allows when doing updates to update only the needed parts of the whole stack (like phpmyadmin) and its dependencies, not interfering with other container applications.

  • @irshadmuhammed822
    @irshadmuhammed822 2 ปีที่แล้ว

    Great Tutorial, Thank you

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

    thanks a lot, very helpful tutorial

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      I am glad that you find it useful !

  • @squattingnomad6298
    @squattingnomad6298 3 ปีที่แล้ว

    You sir are brilliant!

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

    Great tutorial , it helps a lot!. But facing an error `Pulling db (myql:8.0.1)...
    ERROR: pull access denied for myql, repository does not exist or may require 'docker login': denied: requested access to the resource is denied
    ` while docker-compose up

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

      you'll need to login to docker hub first with: docker login

  • @VictorPegas0BR666
    @VictorPegas0BR666 3 ปีที่แล้ว

    Thanks, very helpful!

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

    Brother, I cannot access subfolders even if I do chmod 755 -R /var/www/html, any sugestion?

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

      try also giving chmod g+s to the folder.

  • @anonymousnone1950
    @anonymousnone1950 3 ปีที่แล้ว

    sir, I have tried this on an ubuntu virtual machine in open stack. I got stuck after creating .yml file and using docker compose up. the terminal stops and doesn't show an image after this statement.
    command line: 'apache2 -D FOREGROUND'
    nothing happens after this..
    what is the issue?

    • @NevyanNeykov
      @NevyanNeykov  3 ปีที่แล้ว

      I'm not using the command you mentioned in the video, anyways the correct syntax would be: CMD ["apachectl", "-D", "FOREGROUND"] - this will run Apache in foreground, causing it not to respawn as new process with different PID, but to run inside the shell/init process(already running with PID 1). Docker follows the PID 1 exit signal in order to kill the container. In this case will follow apache, so the container will not exit until apache is not stopped.

  • @oluwatoyosioyelayo7569
    @oluwatoyosioyelayo7569 4 ปีที่แล้ว

    Thanks for the tutorial. Can this work on docker desktop for mac without VM?

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      H, I think it should, just try it. The developers are constantly improving the support.

    • @oluwatoyosioyelayo7569
      @oluwatoyosioyelayo7569 4 ปีที่แล้ว

      @@NevyanNeykov Thanks. Will try it

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

      @@NevyanNeykov Thank you. It worked fine

  • @4thbx
    @4thbx 4 ปีที่แล้ว

    Great tutorial, just what I needed to get up and running with solid explanation along the way. Any chance of you doing a follow-up to add phpmyadmin?

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      Thank you, you can try the containerized version of phpmyadmin: hub.docker.com/r/phpmyadmin/phpmyadmin/ or please take a look at my comment to
      Yogi Ghorecha.

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

      @@NevyanNeykov I was able to get pma setup with your help. Thanks so much! This really is the best video on configuring a docker-compose.

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

    Hi Great Video, very useful.
    I'm using a virtual machine with ubuntu server, I can ping it and have acces to it via sftp on my local machine, but when I run the containers and try to acces from my browser i get a ERR_CONNECTION_TIMED_OUT. Care to give some advise?

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

      Hi, I would first run nmap to see if there are any container ports open inside the VM. Then if there are would check on the host the same and would do ports redirect from the VM to the host if they aren't.

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

      @@NevyanNeykov Thanks the network config of my virtualmachine was set to NAT, everything worked as it should when I changed it to Bridge Adaptor.

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

      Great you found the answer:)

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

      @@NevyanNeykov I found that runing "docker-cpmpose up" I get this error on a line of Dockerfile: "The command '/bin/sh -c apt-update && apt-get -y upgrade' returned a non-zero code: 127"

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

      you can check your internet connectivity.

  • @Bonksy42
    @Bonksy42 4 ปีที่แล้ว

    How do i control the database tables with something like phpmyadmin or mysql workbench? Im really new to this stuff :D

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      you can install additionally connected phpmyadmin container to be able to access the database tables: hub.docker.com/r/phpmyadmin/phpmyadmin/

  • @haidinurhadinata2661
    @haidinurhadinata2661 4 ปีที่แล้ว

    immersive your course.. but i still confused about that. how to implement to the container ?

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      Hi, you have several options: 1) to use VSCode plugin for Docker to develop inside a container 2) to create a 'bind mount' and develop locally, while running the result in container environment. 3) when your code is ready to be deployed for production, to build and push a new image of your application to a 'registry'(local or remote) and then create and run a container based on the image.

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

    Many Thaks, Really good aid!!

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      Thank you for the feedback !

  • @Azka-d1t
    @Azka-d1t 3 ปีที่แล้ว

    great tutorial Sir!

  • @coll_4546
    @coll_4546 3 ปีที่แล้ว

    ERROR: yaml.scanner.ScannerError: while scanning for the next token
    found character '\t' that cannot start any token
    in "./docker-compose.yml", line 3, column 1 help

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

      Please check your syntax, and don't use the TAB character.

  • @b4rt1j1
    @b4rt1j1 2 ปีที่แล้ว

    Hi, may i ask how to know which version to specify to the docker compose file?

    • @NevyanNeykov
      @NevyanNeykov  2 ปีที่แล้ว

      Hi, if you watch the video you will see that it is 3.3, but nevertheless the version is not that important in this setup.

  • @ashique12009
    @ashique12009 4 ปีที่แล้ว

    Good but i have got an issue in mysql container: mysql docker container exited with code 1.
    Could you tell me how to fix that?
    Thank you.

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      Hi, please post the whole docker log in order to investigate. It is good to check if you are using volumes: whether inside the docker container already exists anything in the volume. Or, just try to clean up the whole system with: "docker system prune --all" and recreate the compose file services.
      Note: by default mysql uses user with uid=1001 (which is non-root), so it is also possible that you are trying to mount your local /var/lib/mysql (mysql data directory not owned by 1001), to a non-root docker image. This will fail, since user 1001 (from the container) needs to perform read/write operations to your local directory. In this case please do: sudo chown -R 1001 /tmp/mysql

    • @ashique12009
      @ashique12009 4 ปีที่แล้ว

      @@NevyanNeykov Thank you, hope it was my typo issue. Now its working.

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      @@ashique12009 glad it worked :)

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      @@ashique12009 great :)

  • @tungnguyen4143
    @tungnguyen4143 4 ปีที่แล้ว

    Nice tutorial
    I have a question, How I can access to phpmyadmin for creating tables?

    • @alain1488
      @alain1488 4 ปีที่แล้ว

      easy peasy add this :
      phpmyadmin:
      image: phpmyadmin/phpmyadmin
      container_name: phpmyadmin
      links:
      - db
      environment:
      PMA_HOST: db
      PMA_PORT: 3306
      PMA_USER: devuser
      PMA_PASSWORD: devpassword
      MYSQL_ROOT_PASSWORD: root
      MYSQL_USER: root
      MYSQL_PASSWORD: devpassword
      ports:
      - 8080:80

    • @MrBakkertje01
      @MrBakkertje01 4 ปีที่แล้ว

      @@alain1488 Tried this, but have a Access denied error on phpmyadmin:
      Settings:
      db:
      container_name: mysql8
      image: mysql:8.0
      command: --default-authentication-plugin=mysql_native_password
      restart: always
      environment:
      MYSQL_ROOT_PASSWORD: root
      MYSQL_DATABASE: test_db
      MYSQL_USER: devuser
      MYSQL_PASSWORD: devpass
      ports:
      - 6033:3306
      phpmyadmin:
      image: phpmyadmin/phpmyadmin
      container_name: phpmyadmin
      links:
      - db
      environment:
      PMA_HOST: db
      PMA_PORT: 3306
      PMA_USER: devuser
      PMA_PASSWORD: devpassword
      MYSQL_ROOT_PASSWORD: root
      MYSQL_USER: devuser
      MYSQL_PASSWORD: devpass
      ports:
      - 8080:80

  • @anjalidas660
    @anjalidas660 4 ปีที่แล้ว

    This is very nice tutorials..but I have one doubt. Will you please help me out. Actually I am using ubuntu vm in my windows system..then what should be my ip address to run container in browser.

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

      Hi, if you run the browser from Ubuntu VM the IP, address is localhost or 127.0.0.1 (as the ip address of the host machine docker runs on).
      If you want to reach the VM from outside (the Windows host), you would like to look for the IP address of the virtual machine. You can use ipconfig to find find it out.

  • @boilup709
    @boilup709 4 ปีที่แล้ว

    Thanks for the video!

  • @daoviettrung1665
    @daoviettrung1665 3 ปีที่แล้ว

    Thank you so much , good video

  • @alvin_lal
    @alvin_lal 3 ปีที่แล้ว

    thank you, very helpful

  • @XORknight
    @XORknight 4 ปีที่แล้ว

    How would you make this work with a domain name e.g. example.local and not locolhost:8080

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      If you would like to browse example.local, just use hosts file and there map the IP address to example.local. In case you need both port and IP mapping to example.local you'll need to setup a reverse proxy.

  • @snowbydave1
    @snowbydave1 4 ปีที่แล้ว

    Can we run Dockerfiles and docker-compose.yml shown in your example on Windows 10 64 bits OS ?

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      After installing Docker the syntaxis is the same so you can run the files.

    • @snowbydave1
      @snowbydave1 4 ปีที่แล้ว

      @@NevyanNeykov
      I have try it but each time I am getting error. I am using Windows 10 64 bits OS.
      I want to create package for LAMP/WAMP. I got lots of textual help/vidoes. However none of them is working.

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      @@snowbydave1 what is the error saying?

    • @snowbydave1
      @snowbydave1 4 ปีที่แล้ว

      @@NevyanNeykov
      E:\docker\youtube1>docker-compose up
      Creating network "youtube1_default" with the default driver
      Pulling web (php:7.3-apache)...
      7.3-apache: Pulling from library/php
      ERROR: no matching manifest for windows/amd64 10.0.18362 in the manifest list entries

    • @snowbydave1
      @snowbydave1 4 ปีที่แล้ว

      I have typed docker-compose.yml and Dockerfile as it is and then I am trying to run it on Windows 10 with docker-compose up. It will give error only.

  • @arthurpanganiban6473
    @arthurpanganiban6473 3 ปีที่แล้ว

    Beautiful!

  • @danaelhertani7976
    @danaelhertani7976 5 ปีที่แล้ว

    Could you do a video on building off of this environment by installing composer and laravel?

    • @NevyanNeykov
      @NevyanNeykov  5 ปีที่แล้ว

      hi, I have the setup in my Docker for web developers course.

    • @danaelhertani7976
      @danaelhertani7976 5 ปีที่แล้ว

      @@NevyanNeykov Thanks! Your videos are great.

  • @deepanshushora
    @deepanshushora 2 ปีที่แล้ว

    i followed the same steps but i want to connect my mysql container which i already made it outside of docker-compose file.
    so how do i do it.

    • @NevyanNeykov
      @NevyanNeykov  2 ปีที่แล้ว

      could you elaborate your question?

    • @deepanshushora
      @deepanshushora 2 ปีที่แล้ว

      @@NevyanNeykov thanks for replying. i got the solution for that
      i have made two container one for php with adminer and one for mysql
      and then i connected both with same network. so now i can manage my mysql without running php with it

    • @NevyanNeykov
      @NevyanNeykov  2 ปีที่แล้ว

      @@deepanshushora great you solved the challenge. Now you can move towards Podman :)

    • @deepanshushora
      @deepanshushora 2 ปีที่แล้ว

      @@NevyanNeykov sure

  • @coll_4546
    @coll_4546 3 ปีที่แล้ว

    ERROR: In file './docker-compose.yml', service must be a mapping, not a NoneType help

    • @NevyanNeykov
      @NevyanNeykov  3 ปีที่แล้ว

      Once again check your indentations. For example:
      services:
      service1:

  • @oussamaandaloussi
    @oussamaandaloussi 3 ปีที่แล้ว

    plz if you will to put the repo of project for all files used in this tutorial or use gist github is very powerful for this typical case. thank you a lot.

    • @NevyanNeykov
      @NevyanNeykov  3 ปีที่แล้ว

      thank you for the advice, it is a nice idea.

  • @peekpt
    @peekpt 4 ปีที่แล้ว

    I think you make a typo and used php 7.3 on compose and 7.3.3. on docker file, but it doesn't matter it only used the Dockerfile one

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      Hi, it is not a typo. First in the docker-compose we create a simple php web service, based on php:7.3-apache. Then we update the web service using custom Dockerfile, which helps us to add MySQL extensions, it is based on another image: php:7.3.3-apache.

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

    thank you very much

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      I am glad, that you like the video !

  • @hellenribas2385
    @hellenribas2385 2 ปีที่แล้ว

    Perfect!!!

  • @b4rt1j1
    @b4rt1j1 2 ปีที่แล้ว

    Still getting 403 forbidden even after creating index.php would someone help me with solution please?

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

      Just execute shell to enter inside the container and inspect as it is your own machine.

  • @ayoubguismi4558
    @ayoubguismi4558 4 ปีที่แล้ว

    i get this error when i run docker-compose up in 08:06 :
    ERROR: SSL error: [SSL: TLSV1_ALERT_PROTOCOL_VERSION] tlsv1 alert protocol version (_ssl.c:590)

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      try setting: COMPOSE_TLS_VERSION=TLSv1_2 as an environment variable.

  • @O-LukasYahyaAdiPuspo
    @O-LukasYahyaAdiPuspo 3 ปีที่แล้ว

    Hello sir thank you for your grateful tutorial, i have some trouble in connecting the php and db like this: Warning: mysqli_connect(): (HY000/2002): and its look like because of the $host name. Can you figure it out sir? Thank u so much anyway

    • @NevyanNeykov
      @NevyanNeykov  3 ปีที่แล้ว

      Please check the credentials and port you are connecting to. Apart from this in your php code, you'll need to connect to host name which is the service name - in this case it is called: db.

    • @O-LukasYahyaAdiPuspo
      @O-LukasYahyaAdiPuspo 3 ปีที่แล้ว

      @@NevyanNeykov whooa thank you for answering my question, sir. It's fixed by now. but may i know how the docker network can be formed? I mean how the network of form_default possibly happens? Thank you so much sir, this is very important for my study, you helped me so much

    • @NevyanNeykov
      @NevyanNeykov  3 ปีที่แล้ว

      Docker compose shares a default subnet between its containers/services. Additionally one can specify different networks to be used by the containers. Internally, this is done via virtual network interfaces using the concept of namespaces.

    • @O-LukasYahyaAdiPuspo
      @O-LukasYahyaAdiPuspo 3 ปีที่แล้ว

      @@NevyanNeykov oh i get it sir thank u so much. But what if, i want to make another pages with php? Should i make another services in docker compose or I only create a new container from php images and connect it to the network sir? Sorry if I'm asking too much anyway🙏

    • @NevyanNeykov
      @NevyanNeykov  3 ปีที่แล้ว

      Container acts as an isolated server. From there on, you can create multiple containers each representing a service application/database/storage etc. on one or several distributed bare-metal machines, and connect them together.

  • @amastou4634
    @amastou4634 5 ปีที่แล้ว

    My cli doesn't recognize "nano" command. what's the name of the CLI please

    • @NevyanNeykov
      @NevyanNeykov  5 ปีที่แล้ว

      You can install it using: sudo apt install nano. Or just use another text editor.

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

    so the /php folder acts as a /var/www/html/ folder ?

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      yes, this will be the document root folder residing inside the container, for serving php files.

  • @aashishkumar5891
    @aashishkumar5891 4 ปีที่แล้ว

    ERROR: yaml.scanner.ScannerError: mapping values are not allowed here
    in "./docker-compose.yaml", line 2, column 9
    i got this error , can you help pls

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      Hi, please check your spaces and indentation - docker syntax is sensitive.

    • @aashishkumar5891
      @aashishkumar5891 4 ปีที่แล้ว

      @@NevyanNeykov Do i have to create the directory /var/www/html , before running the docker compose

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      /var/www/html is a directory which will be automatically created inside the container.

  • @ranaarepalli
    @ranaarepalli 5 ปีที่แล้ว

    Thanks for the help.. i was able to build it. now im trying to add a data(from my local machine) which has an extension of .sql(10 gb data) into mysql database in docker. can you please help me with that. i appreciate the help. thank you

    • @NevyanNeykov
      @NevyanNeykov  5 ปีที่แล้ว

      please see here: hub.docker.com/_/mysql

    • @ranaarepalli
      @ranaarepalli 5 ปีที่แล้ว

      @@NevyanNeykov thank you. I m a layman in this thing. can you break this down into smaller steps and can you explain me?
      thank you

    • @NevyanNeykov
      @NevyanNeykov  5 ปีที่แล้ว

      @@ranaarepalli if you already have the sql file, please see the reply to Andres Henao's comment, where you import your local database dump file into the mysql container using proper credentials.

    • @ranaarepalli
      @ranaarepalli 5 ปีที่แล้ว

      Nevyan Neykov thanks ... it worked... and it’s working .... but it’s connected. It didn’t get imported into container.... can u tell me where can I look for that

  • @bunjiroakimoto8578
    @bunjiroakimoto8578 4 ปีที่แล้ว

    # docker-compose up
    ERROR: yaml.scanner.ScannerError: mapping values are not allowed here
    in "./docker-compose.yml", line 5, column 23

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      please check your docker-compose.yml syntax, especially tabs and spaces.

  • @kanhaiyatulsyan7560
    @kanhaiyatulsyan7560 3 ปีที่แล้ว

    ports he is entering for db are just some random numbers??

    • @NevyanNeykov
      @NevyanNeykov  3 ปีที่แล้ว

      Ports 80 and 3306 are the default for Apache and MySQL respectively. Then you choose which ports to map these, to expose them on the machine.

  • @chris_james
    @chris_james 5 ปีที่แล้ว

    version: '3.3'
    services:
    web:
    image: php: 7.3-apache
    container_name: php73
    volumes:
    - ./php/var/www/html/
    ports:
    - 8000:80
    -----------------
    ERROR: yaml.scanner.ScannerError: while scanning for the next token
    found character '\t' that cannot start any token
    in "./docker-compose.yml", line 4, column 1

    • @NevyanNeykov
      @NevyanNeykov  5 ปีที่แล้ว

      Please check whether you are using spaces between the properties and their values, as well as 'tabs' for indentation. Also on line 4: remove the space between php: and 7.3

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

      @@NevyanNeykov didn't know indentation was that important . Thanks for the quick reply as well

  • @batmanbatmann
    @batmanbatmann 5 ปีที่แล้ว

    much bueno
    thanks my friend

    • @NevyanNeykov
      @NevyanNeykov  5 ปีที่แล้ว

      I am glad, you liked it !

  • @tobi_dosumu
    @tobi_dosumu 2 ปีที่แล้ว

    Hello. Please, how did you save the file here 7:44 ?🙏

  • @kebelarmandoandrades5724
    @kebelarmandoandrades5724 4 ปีที่แล้ว

    How to use MSSQLSERVER with PHP in a container??

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

      For the mssql part try the following resource: hub.docker.com/_/microsoft-mssql-server

  • @MW3xpjerry
    @MW3xpjerry 3 ปีที่แล้ว

    damn this is good

  • @AminaTehami-u1z
    @AminaTehami-u1z 2 หลายเดือนก่อน

    hi i am facing an issue after removing images can you please reply so i can ask

    • @NevyanNeykov
      @NevyanNeykov  2 หลายเดือนก่อน +1

      elaborate...

    • @AminaTehami-u1z
      @AminaTehami-u1z 2 หลายเดือนก่อน

      @@NevyanNeykov Fatal error: Uncaught mysqli_sql_exception: Connection timed out in /var/www/html/index.php:7 Stack trace: #0 /var/www/html/index.php(7): mysqli->__construct('db', 'devuser', Object(SensitiveParameterValue), 'test_db') #1 {main} thrown in /var/www/html/index.php on line 7
      this is an error i am getting after refreshing the site. i followed every step
      but i am using '8.4-rc-apache' image

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

      somehow the mysql-container is not working
      please try this configuration:
      db:
      image: mysql:9.0
      container_name: mysql-container
      ports:
      - "3306:3306"
      environment:
      MYSQL_ROOT_PASSWORD:
      MYSQL_DATABASE:
      MYSQL_USER:
      MYSQL_PASSWORD:
      After running: docker-compose up , check whether port 3306 is open: lsof -i -n -P | grep mysql . If it is then ,check your .php connection string (username, db, password) etc.

    • @AminaTehami-u1z
      @AminaTehami-u1z 2 หลายเดือนก่อน

      @@NevyanNeykov it worked but it's not connecting to php . Warning: mysqli::__construct(): (HY000/2002): Connection timed out in /var/www/html/index.php on line 10
      connection failedConnection timed outsuccessfully connected to MYSQL
      this is happening

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

      try: docker system prune --volumes
      then: docker exec -it db mysql -uroot -p
      ALTER USER 'root'@'localhost' IDENTIFIED BY 'password';
      other than this continue to debug line by line..

  • @dylanreynolds9164
    @dylanreynolds9164 5 ปีที่แล้ว

    why would other images interfere? isn't the idea of containers to isolate environments?

    • @NevyanNeykov
      @NevyanNeykov  5 ปีที่แล้ว

      You are right, you can have as many images as you want and they will not interfere. In the video we just had to rebuild the images, to reflect their new configuration. This could be done either with compose up (when there are no existing images the command will also build them) or with compose build.

  • @computadorhumano949
    @computadorhumano949 3 ปีที่แล้ว

    my question is where's your files folder?

  • @pablofiscella5016
    @pablofiscella5016 4 ปีที่แล้ว

    Hi friend. I have a problem. When I try to run index.php you get this message.
    Warning: mysqli :: __ construct (): (HY000 / 1045): Access denied for user 'devuser'@'172.18.0.3' (using password: YES) in /var/www/html/index.php on line 7
    connection failedAccess denied for user 'devuser'@'172.18.0.3' (using password: YES)
    Follow the whole tutorial and I can't find what the problem is. Thanks for all

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      hi, try to remove the line: command: --default-authentication-plugin=mysql_native_password and rebuild the container with docker-compose up -build
      other than this, please check your credentials for connection to the mysql(db) container service.

    • @pablofiscella5016
      @pablofiscella5016 4 ปีที่แล้ว

      @@NevyanNeykov delete the command line and it remains the same. How do I verify or change the credentials. It seems more like a permission problem. But I don't understand what it can be. To msql it connects fine
      In de docker log say sha256_password reported: ''sha256_password' is deprecated and will be removed in a future release. Please use caching_sha2_password instead

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      such description of a problem sounds very mixed to me... Probably it is your php file - the connection string, check the host/username/password combination you are using, whether it exists in the mysql USER table, and if not please add it.

    • @pablofiscella5016
      @pablofiscella5016 4 ปีที่แล้ว

      ​@@NevyanNeykov phpmyadmin now works fine. This is my mistake now Warning: mysqli::__construct(): The server requested authentication method unknown to the client [caching_sha2_password] in /var/www/html/index.php on line 7. Thanks

    • @NevyanNeykov
      @NevyanNeykov  4 ปีที่แล้ว

      if in your setup phpmyadmin works, you can take a look at its source files on how it makes the connection and use the same in your index.php file.

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

    plis help me with you source code + docker action workflow code plis🙏

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

      what exactly are you looking for?

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

      @@NevyanNeykov i haven't solved the problem, my teacher asked me to push docker hub and push github

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

      @@NevyanNeykov and the case you have is similar to me, maybe you know how to push to docker hub and github?

  • @JohnSmith-zl8rz
    @JohnSmith-zl8rz 5 ปีที่แล้ว

    why not do it in virtual machine with vagrant? you do it in your local computer.

    • @NevyanNeykov
      @NevyanNeykov  5 ปีที่แล้ว

      Because of speed decrease when being in virtual environment. Otherwise the setup is the same.

    • @JohnSmith-zl8rz
      @JohnSmith-zl8rz 5 ปีที่แล้ว

      @@NevyanNeykov thanks, yes but I don't like "dirt" my machine, so I think is better make it a virtual machine, of that way you can update or delete the MacOS without loosing the docker stuff.

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

      @@JohnSmith-zl8rz like with the VM's you can always remove the containter and its contents. Biggest container plus is that you don't need to install an additional OS, thus the container becomes a lightweight, and much faster wrapper of your app.

  • @vitche727
    @vitche727 5 ปีที่แล้ว

    :( "You don't have permission to access this resource."

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

      Try using sudo in front of the command, or just use chmod to change the permissions.

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

      @@NevyanNeykov , thanks a lot, but I tried it already - didn't help

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

      @@vitche727do you know where exactly is the error coming from ?

    • @vitche727
      @vitche727 5 ปีที่แล้ว

      @@NevyanNeykov All Ok now! The problem was in using the Ubuntu subsystem on Win10. I should use cmd, but I used ubuntu bash. Thanks for your wish help!

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

      @@vitche727 I am glad that you solved the problem! :)

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

    Docker for web developers course: www.udemy.com/course/docker-for-web-development/?referralCode=A2E670BCADBA69B54F07

    • @til4dome4
      @til4dome4 4 ปีที่แล้ว

      What if i have a web application already and would want to incorporate docker, how would i go about it? Kindly help

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

      @@til4dome4 I'll start by inspecting and creating the application requirements such as: persistent volumes, networks, environment variables etc. Then would try to convert the monolithic application into micro-services and will create connected containers, where those micro-services would interract. When done, before going live, would increase the container security by using non-root users, exposing only needed services to the end-user, as well as placing additional resource monitoring containers. All this orchestrated by Kubernetes.

    • @til4dome4
      @til4dome4 4 ปีที่แล้ว

      @@NevyanNeykov Thank you so so much...let me work on it, then will get back to you

  • @travisgoesthere
    @travisgoesthere 2 ปีที่แล้ว

    As a dev for many years , they have made a simple process of setting up a webserver way too complicated. Ridiculous

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

      I agree, personally prefer stand-alone dev server to create experiments on bare-metal machine. Nowadays Docker becomes obsolete, being replaced with Podman, and so on...

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

      @@NevyanNeykov Nevertheless i forgot to tell you that you did a great job of doing the vid. Much Appreciated. You simplified it over alot of others that I watched

    • @NevyanNeykov
      @NevyanNeykov  2 ปีที่แล้ว

      Thank you:)

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

    Greatly appreciated your efforts on this tutorial. God Bless you!