[Docker] Composer with Intl Extension

Wednesday, August 24, 2016 4 Comments

Well, I recently convert my apps to docker. And I feel like, it's awesome! I can reinstall my Ubuntu for 1000x hahaha.. By dockerizing my apps, I'm no longer confused on setting the apps every time. It's like I can run it everywhere with the same configuration.

One of the dockerized apps I've used is, composer. Of course it's a main apps. How can I work if I cant use composer. Back in the past, I installed composer in a container. Later, I knew it was not a good practice. Working with docker, means we are working with root mode. And we shouldn't run composer in root, right? Beside, it's not best practise to install docker in a container. It's quite finicky to run inside a container and run composer. It's a nope then.

Official docker composer

There's an official docker composer out there. You can find it here: Docker Composer. The instructions are clear. I'm sure you could follow it. Once I used it, but I'm using another now hahaha.. This official docker composer doesn't come with intl-extension which I really need in order to get the framework done. I'm using CakePHP 3 which it's rely on Symfony library. And Symfony needs this intl extension. For normal uasage, this composer would suits most people.

Docker composer with intl [see update]

This is what I need. In short, go to this docker hub. What a life saver. Now I could work again #yay. Do you know how I'm suffering by using composer inside a container? It's a lot, dude! Grab it and spend your hours on something else!

PS. You still need do the instructions in official docker composer in order to make it works. Just adjusted the image to docker-with-intl composer, since the hub is quite simple :D

Update 31 August, 2016

How to add extension php-intl
I got another answer. This one is from the author of docker-composer, RobLoach. He said, if we could just pass `--ignore-platform-reqs` when running the composer. Well, and it just works. For detail option, please refer to composer docs (https://getcomposer.org/doc/03-cli.md) as well. 

Lorem ipsum dolor sit amet, consectetur adipiscing elit, sed do eiusmod tempor incididunt ut labore et dolore magna aliqua. Ut enim ad minim veniam, quis nostrud exercitation ullamco laboris nisi ut aliquip ex ea commodo consequat.

Do you think I forgot to change this text? No, dude. I did it on purpose ahahahay..

4 comments

Write comments
Aqied
AUTHOR
August 24, 2016 at 10:31 PM delete

Ini ngomongin apa sih. Gak ad yg ku mengerti

Reply
avatar
tom
AUTHOR
August 25, 2016 at 2:08 AM delete

Laaah.. Tagnya aja sudah beda :|

Reply
avatar
August 31, 2016 at 12:16 PM delete

ini plis ngomongin apa sih. emang kaya gini ada yg baca po?

Reply
avatar
tom
AUTHOR
September 1, 2016 at 10:38 AM delete

Ada, dong.. Kalau yang kayak gini, yang datang dari luar wkwkwkwk.. Dan ini juga jadi catatan juga hahaha..

Reply
avatar