Dockerfile Tutorial by Example – ( Part III – Creating a docker PHP Slim image )



In this video we create a docker image to work with the Slim PHP micro framework.
I show you the steps and key considerations to pull the right base image, install composer, install Slim and do some basic configuration.

* NOW YOU CAN LEARN MORE WITH ME. MY DOCKER BOOK HAS BEEN PUBLISHED IN JUNE, 2018! CHECK IT OUT HERE: *

This video is part of a series, in later videos we will build a node, as…

, , , , , , , , ,

28 thoughts on “Dockerfile Tutorial by Example – ( Part III – Creating a docker PHP Slim image )

  1. Would you develope your application code using slim from the container or in you local host and then, once ready, copy it to the container? What would be the preferred workflow?

  2. Good tutorial. I have very basic question. Dont we need to install base OS inside container? Or we can just install tools/utilities/packages required, and we dont need any OS as such ?

  3. First, this command does not work to me, the apache file is not updated:
    **RUN sed -i 's/DocumentRoot.*$/DocumentRoot /var/www/html/public/' /etc/apache2/sites-enabled/000-default.conf**
    although it works if i do it manually in the bash.
    Second: thank you!!!! Finally I have a better understanding of how things work with Docker 🙂

  4. Having the db.php connecting parameters hardcoded in the code does not seem a good idea. I would be better to put the DBHOST, DBUSER, DBPASS, DBNAME as Enviromental Variables in the docker-compose.yml. My question is: how would you access those ENV variables in the Slim Framework? I tried $_ENV['DBHOST'] and getenv['DBHOST'] without success. Any ideas? Thank you very much.

  5. I'm using html not php . How to code Dockerfile like that? I use the already had in hub and can do it easily but I want to know from the basic not taking in Docker store

  6. Thank you, very useful series so far. You have a nice manner, and it was good to see your process. I've now done an alpine/unbound dns container, and will create others for it to play with soon. It's actually been fun.

    Apline is quite new to me, and I love apk. It's so quick compared to apt or yum. Thinking using on vps's I tinker with.

  7. Thanks a lot, your tutorials are awesome. I watched all of them and would request you to please share some tutorials that will include the complete hands on demo of CD/CI flow for a product. May be including the Docker, Ansible and Jenkins. That would be again a great help!! Thanks Mark..

  8. This is one excellent training exercise. I have been trying to get Composer installed and configured inside of Docker without success until I came across this. Not only how to do it but the problems to avoid. Thank you so much Mark.

  9. Thank you so much!! Im a new graduated IT guy and trying to learn Docker container with hands-on tutorials, your teaching style is so simple and clear, examples are great. You inspired me a lot sir… Do you plan to make DevOps tutorial video series like AWS, Jenkins, Ansible etc.?

  10. This is what learning should be, simple to understand yet complex and powerful in nature; great job on your ability to simplify complicated concepts; A lot of the Udemy courses drag this on for hours and end up confusing me; you've gone straight to the point and made is absolutely brilliantly easy to understand what Dockerfiles are; no more mysteries 🙂

  11. A couple of days ago, I only knew what Docker was and what could be accomplished with it – with no hands-on experience. This has dramatically changed after you got me jumpstarted on Docker with this series, and moved quite some work from my VMs over to docker containers. Thank you so much, Mark, this is an excellent resource!

  12. Thank you so much, your course is awesome and you are a great teacher 🙂 I watched every part and you really helped me to start with docker. Looking forward to watch nodeJS tutorial 🙂

Leave a Reply

Your email address will not be published. Required fields are marked *