We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

Dockerfile with Phalcon2 + Nginx

Hi guys,

the phalcon framework looks really nice and I was searching for a Dockerfile with phalcon v2 and an nginx installation to give it a try.

It would be nice if someone could share his Dockerfile.

Thanks alot,

Jan

Thank you for you fast reply. That looks perfect. Are there additional tutorials about your project. It looks really interesting. Would like to dive a bit deeper in it.

edited Dec '15

Wow, I am really impressed. First impression: Its a perfect starting point. I give it a try and feedback later.

edited Dec '15

I am running the latest Docker Toolbox v1.9 on Windows 7 x64 and try to build your Dockerfile.

I solved a permission problem by adding chmod

ADD . /opt/webird

RUN chmod -R 755 /opt/webird/

Now I stuck on this error message while building the Dockerfile

Step 8 : RUN /opt/webird/setup/provision-system.sh ubuntu1404 ---> Running in 571a409f1fbf : No such file or directory

Do you have any idea, how to solve this? Or is this a windows problem?

Sorry m8, your Dockerfile is building fine. I have had a problem with Sourcetree and line endings. Sourcetree is converting all line endings at windows CRLF by default. Never have had this problem before. Now, I downloaded the project as zip and copied the .git folder and everything is fine.

edited Dec '15

I really tried hard to get it running. Repaired the dockerfile and updated some settings. But I still can not get it to running. Sorry, I try an other dockerfile. I would really like to start to test phalcon.

I could push my changes if you like to. But they contain changes to the config files in the ubuntu1404 folder. And I added colored output to debug the installation process.

I forked your project and pushed my changes to: https://github.com/JanOschii/webird

edited Dec '15

you added nodejs to the system package list but it is already being installed from source.

I was stucking at the nodejs installation. Later i get the problem: wrong version number in 20-node.sh. I have kicked at now from the package list. (new commit)

Hey, so by "get it running" do you mean to have the Dockerfile completely setup the environment and to start all of the servers?

No, sorry. The installation seems to be successfull until setting a new password in "95-service-configure.sh"

If you really want to test Webird in a complete system then you will need to use a cheap $5 VPS, use Virtualbox or complete the Dockerfile.

The new Docker Toolbox installation with docker-compose is really an easy way to install such an environment. I am not a pro in such thing, but I use now docker to create development and distribution environments on my windows system.

a custom architecture that everyone will be needing to decide how Webird is divided. For example it seems like one type of container runs the database, another runs the web server, another is storage, etc.

Docker Compose is the perfect tool for it. I added a docker-compose.yml file from an other project that reflects this concept.

Also perhaps the Dockerfile should have a comment on it that everything is installed and that it is now up to the developer to turn services on and to configure the architecture.

I am not sure about that. At the end, a complete docker image should run as expected. For instance, on DockerHub you automatic build docker images by linked repositories. Building an architecture is (as I understand this) something that you do with environment variables (while starting the docker container) and of course docker compose. Check out comp-install.sh. (new commit)