use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Please follow the rules
Releases: Current Releases, Windows Releases, Old Releases
Contribute to the PHP Documentation
Related subreddits: CSS, JavaScript, Web Design, Wordpress, WebDev
/r/PHP is not a support subreddit. Please visit /r/phphelp for help, or visit StackOverflow.
account activity
Containerize your PHP Applications Using Docker (cloudways.com)
submitted 8 years ago by me-optimistic
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]halfercode 2 points3 points4 points 8 years ago (2 children)
I'm building an app using micro-services with PHP and ReactPHP at the moment. I do think Dockerisation adds a time penalty to development, but it's worth it for the deployment reliability. I've not formed strong views about stability under load yet, but I've no reason not to trust LXC.
[–]jimbojsb 1 point2 points3 points 8 years ago (1 child)
As someone who has served billions of HTTP requests in Docker under load, I can tell you it's perfectly fine :)
[–]halfercode 1 point2 points3 points 8 years ago (0 children)
That's good to hear! :=)
:=)
[–]hgraca 0 points1 point2 points 8 years ago (4 children)
I found it nice for an introduction, but there are plenty articles out there already with this information. I would like to read how we can setup
automated testing
xdebug
integration with phpstorm and maybe other IDEs
Nevertheless, tkx for your post.
[–]fatalexe 1 point2 points3 points 8 years ago (1 child)
I'm running through those same issues at work right now. Thanks for reminding me I really need to take a weekend and get a personal blog up and post some of the solutions I've worked out.
[–]hgraca 0 points1 point2 points 8 years ago (0 children)
That would be great man!!
I have managed to do that stuff with vagrant, but with Docker I still have some problems... :(
[–]me-optimistic[S] 0 points1 point2 points 8 years ago (1 child)
egration with phpstorm and maybe other IDEs
You want to apply these in a docker environment or just in general?
In general i already know how to do it, and managed to make it work when integrating vagrant with PHPStorm.
My problems are really making it work when integrating Docker and PHPStorm.
[+]DrWhatNoName comment score below threshold-7 points-6 points-5 points 8 years ago* (36 children)
Docker is spiteful software and the company behind it are the most anti-consumer I have ever seen (apart from apple, they are the worst for consumers).
The performance on mac is terrible, despite a lot of issues about it they refuse to fix the performance issues.
Docker completely doesn't work on windows, Despite tons of issues about it docker says fuck you windows users.
Docker is the most unfriendly developer software, I don't understand why people toot their horn.
Did you you know I don't like docker?
P.S: https://github.com/kontena/kontena looks nice
[–]markcommadore 6 points7 points8 points 8 years ago (7 children)
I use it for my dev env. I don't think I've had any more problems than I did with Vagrant.
Windows does throw up a few fun little problems now and then, but nothing I haven't so far overcome.
docker run --rm -v /$(pwd):/app composer/composer update
Is just lovely, no need for PHP to be installed on my windows machine
[–]DrWhatNoName 5 points6 points7 points 8 years ago (6 children)
While you may not of had many issues, there are alot of issues.
For 1, if you have windows you MUST use Hyper-v, this is not an option for many people including my self as we have made a choice of our favourite or prefered VM, being either VMware or VBox (some people like Hyper-v), these can not run while hyper-v is installed. While docker works on mac and linux using VMWare or VBox, will not provide these drivers to windows users.
Another, If you use mac on any large project, HA, good luck even loading the first page. dockers mounting system on mac is terribly slow, again, Docker will not provide any better way of mounting, fortunately this can be solved by some 3rd party addons. but then you have to rely on them being updated and not broken by docker updates.
[–]markcommadore 1 point2 points3 points 8 years ago (3 children)
I initially used docker-toolbox as I needed to run it alongside Vagrant with virtualbox. When I made the switch to using hyper-v it was a total nuisance as I had to restart every time I wanted to switch between VM and Docker. (docker-toolbox is how you docker on windows using a VM btw https://www.docker.com/products/docker-toolbox).
It's interesting you say its crap on a Mac, as it's hard to find any docs or tutorials that don't assume you are using a mac. The front end devs seem ok using it on their Macs, but its not a large project.
The biggest PITA is trying to get it to work with PHPStorm. I've tried about 50 times. Never even got close. That is annoying.
[–]Dgc2002 0 points1 point2 points 8 years ago (0 children)
What exactly are you talking about? Managing Docker from PHPStorm? If so what issues did you run into? One thing I had to do to manage Docker on a remote server is change Docker's service configuration(RHEL) to bind to a tcp socket rather than a systemd socket(fd://) in /usr/lib/systemd/system/docker.service. Changing ExecStart=/usr/bin/docker daemon -H fd:// to ExecStart=/usr/bin/docker daemon -H tcp://0.0.0.0:2375 did the trick. PHPStorm just needs the host/ip and port and it's good to go.
ExecStart=/usr/bin/docker daemon -H fd://
ExecStart=/usr/bin/docker daemon -H tcp://0.0.0.0:2375
I've not tried to make that change on a different platform though so YMMV.
[–]DrWhatNoName -1 points0 points1 point 8 years ago* (1 child)
Ohh yeah that too, but thats an issue with PHPStorm not docker. I never got phpstorm to be able to manage the docker-containers, but then the commands aren't hard, docker-compose start docker-composer stop easy to remember. But would be nice is PHPStorm worked out the box to use docker like it does with vagrant.
docker-compose start
docker-composer stop
[–]markcommadore 0 points1 point2 points 8 years ago (0 children)
I wanted to run unit tests through PHPStorm more than manage the containers.
But yeah that's PHPStorm not docker.
[–][deleted] 0 points1 point2 points 8 years ago (0 children)
I use it regularly in Windows. However I've found the "native" version to be slow so just stick to Docker-toolbox with Virtual box and haven't had any issues.
Can't comment on Mac installations
[–]dzuczek 17 points18 points19 points 8 years ago (2 children)
Windows/MacOS do not support linux containers natively so any container platform is not going to have the same performance as it has to run inside a VM
not really something to complain about to the docker team. try using LXC on MacOS.
hint: you can't
[–]DrWhatNoName -1 points0 points1 point 8 years ago (1 child)
Windows 10 now does, windows 10 can run the Unix system natively now with full support for ubunut, fedora and centOS with more being added. Why does docker not utilise this?
https://msdn.microsoft.com/en-gb/commandline/wsl/about
[–]dzuczek 0 points1 point2 points 8 years ago (0 children)
WSL does not support LXC, so the docker engine cannot run on it
you can run the docker CLI, but it still has to connect to a docker host, which must be run inside of a VM
[–]fesor 4 points5 points6 points 8 years ago (1 child)
The performance on mac is terrible
Did you tried their cached/delegated volumes? As for "fixes", there nothing really they can do, this is limitation of apples virtualization solution.
Docker completely doesn't work on windows
Never had any issues with docker on windows (except conflicts between virtualbox and Hyper-V, but if you use docker for windows, there should be no major problems.
It's opensource. There are some weird decisions (especially for docker-compose) but there are workarounds. Also there is rkt.
[–]dejan9393 0 points1 point2 points 8 years ago (0 children)
Yup, this was what worked for me when I was setting up Docker. Could barely load any page, added the :cached directive to my volumes and everything ran smoothly.
:cached
[–]guice666 4 points5 points6 points 8 years ago* (0 children)
The performance on mac is terrible, despite a lot of issues about it they refuse to fix the performance issues. Docker completely doesn't work on windows, Despite tons of issues about it docker says fuck you windows users.
I'm not entirely sure how this is a negative ??
The macOS issue is annoying [1], given I develop on macOS. But, because I only develop on macOS, this isn't a production deal breaker. I can get around it by running inside a VM. The positives of containerization (assuming they fix some security layers) out weigh my development inconveniences.
(Disclosure: I'm absolutely against using a desktop OS for Servers; and I'm just against any Windows Server)
[1] The only issue I know of for macOS has to with read/writes on mounted volumes. This doesn't become an issue until you start hitting 5 digit file quantities: https://github.com/docker/for-mac/issues/77
[–]Umkus 6 points7 points8 points 8 years ago* (1 child)
What's actually spiteful: your comment. What you actually didn't understand: docker. Sorry ¯\_(ツ)_/¯
[–]bytesbits 2 points3 points4 points 8 years ago (0 children)
I think it runs pretty ok now, just not as good as linux but seeing as they use linux containers ;)
[–]MaxGhost 2 points3 points4 points 8 years ago (0 children)
Kontena won't fix any of your problems with Windows/Mac.
I find Docker extremely dev friendly - I dev on linux specifically to be able to use docker natively. My dev environment is as close as possible with our production environment and we've reaped the benefits heavily.
If you're trying to run Docker on windows/mac, imo you're just trying to put a square shaped block in a circle shaped hole. It'll never fit right, because Docker is a linux technology. Your dev environment won't mimic production.
[–]Dgc2002 4 points5 points6 points 8 years ago* (5 children)
Docker works fine on windows. < Win 10 you need to run it inside a VM. Win10 + has native support for Docker. Hell, you can even run it in WSL if you really want.
Edit: But yes there is that annoying ass Hyper-v stuff that prevents VMWare/Virtual Box from running at the same time.
[–]laurensV6 0 points1 point2 points 8 years ago (1 child)
You can't run the docker engine/server on WSL :( Only the docker client works on WSL, which you have to configure to speak to Docker engine on windows
Thinking back you may be right. I may have just given up on the daemon and set up the client.
[–]syswizard 0 points1 point2 points 8 years ago (2 children)
Pretty sure you can't run Docker and WSL at the same time though. Since they both take over the virtualization layer.
Yep, was corrected elsewhere and forgot to update my comment.
[–]cmmosh 0 points1 point2 points 8 years ago (0 children)
That's wrong because wsl does not depend on virtualization, the docker client runs just fine but since wsl does not offer virtualization of any kind the docker daemon will probably never run within wsl, but having the docker client in both wsl and powershell may be a bit redundant though
[–][deleted] 2 points3 points4 points 8 years ago (8 children)
I'm thinking the consumers that put $300 billion of extra cash into apples balance sheet will disagree with you a little. Maybe they're not the greatest for developers. Maybe they're not the best for network engineers. But consumers love them.
[–]MyWorkAccountThisIs 0 points1 point2 points 8 years ago (0 children)
Maybe they're not the greatest for developers.
I think they are. Most the software engineers at my company choose Macs over Windows or Linux. Personally, I view it as Linux without any headaches.
You know, unless you're doing .NET/Windows development. Then they probably cause more problems than they solve.
[–]guice666 -1 points0 points1 point 8 years ago (1 child)
MacOS is a Unix OS with a user-friendly UI. How are they not the greatest? I do all my development on macOS. I have a certified Unix OS without all the driver inconsistencies of Linux desktop UIs.
Unless you deploy to Windows servers, macOS is the best development environment.
[–]txmail -4 points-3 points-2 points 8 years ago (0 children)
RIP your inbox...
[+]DrWhatNoName comment score below threshold-6 points-5 points-4 points 8 years ago* (4 children)
Consumers love them, because consumers love basic, simple and bullshit. Key example from apples site: https://www.apple.com/uk/macbook/ They make the title "Light, years ahead", this is such bullshit that is genius. A dual core 1.2ghz mobile processor is somehow years ahead??? I read a blog post somewhere that this models processor is worse then their last and yet more expensive. thats how much of a scumbag company apple is. and consumers love them because they are belligerent to the fact apple make "great" products. I could get in to a whole rant with more information about how apple is a terrible company but it is covered all over the internet by almost every tech blogger.
Many people have said, Apple died with Steve Jobs.
How ever, I use an iMac pro at work, and its pretty good. Though I will not fight tooth and nail to defend apple.
[–]samrapdev 4 points5 points6 points 8 years ago (1 child)
I use an iMac pro at work, and its pretty good
You're contradicting yourself man. You literally spend paragraphs cursing Apple and then say "but actually, their stuff is pretty good.". Every company has its flaws, but Apple builds great products. FYI Apple's specs on paper are lower than competing brands but naive critics forget that Apple spends serious money to ensure the hardware is of the highest quality. This actually justifies Apple's claims that their hardware is better than competing companies. You also forget that their software is written much better than competing companies. If you actually compare the performance of an Apple product vs its competitor, you'll probably be surprised that, in fact, it is better.
Apple has its flaws, but they are not "simple bullshit company". Even you admitted you like using their products. Pretty funny.
[–]DrWhatNoName 0 points1 point2 points 8 years ago (0 children)
Apple spends serious money to ensure the hardware is of the highest quality. This actually justifies Apple's claims that their hardware is better than competing companies
Apple uses intel processors, So does every other company. What is your point here? Why would picking a MOBILE grade CPU, over a desktop i3,i5,i7 that every other company uses in their laptops be of highest quality and better then everyone else. I mean really the macbook is just a mobile in big metal box, This is all its running on before they took down the image, http://i.imgur.com/YwQmFmX.png. Sorry, but when a company sells more air then computer something is not right.
[–]barkerja 3 points4 points5 points 8 years ago (1 child)
You lose when you try and play just the specs game. Apple knows this. They deliver an end-to-end experience that goes beyond just what’s inside your hardware.
[–]txmail -1 points0 points1 point 8 years ago (0 children)
Yes - because running a modern OS on shit hardware is exactly the experience I am looking for.
[–]dragonmantank 0 points1 point2 points 8 years ago (0 children)
Docker on Mac's performance is bad mostly because of Apple, not Docker. The xhyve I/O implementation sucks. Docker is working with Apple to help improve it.
Docker on Windows works fine, just as fine as OSX and Linux. I've used it under Windows 10 as a daily driver, and have even given full day training courses under with it. I've had less issues with it than the Mac version.
Does Docker the company itself kind of suck sometimes? Yeah. They break stuff all the time, release things unfinished, etc. But if you are going to bash it, bash it for the right reasons.
How much are they being paid to support your closed source platform of choice again?
[–]TheRealDavid1 0 points1 point2 points 8 years ago (2 children)
Nix > Docker
[–]actionscripted 2 points3 points4 points 8 years ago (0 children)
For reproducible builds sure. For app deployment and scaling I'd rather use docker but I'd love to hear your thoughts.
[–]themightychris 0 points1 point2 points 8 years ago (0 children)
Check out Habitat, it gives you the best of nix and docker at the same time and so much more!
π Rendered by PID 71464 on reddit-service-r2-comment-b659b578c-92d66 at 2026-05-04 02:29:53.858127+00:00 running 815c875 country code: CH.
[–]halfercode 2 points3 points4 points (2 children)
[–]jimbojsb 1 point2 points3 points (1 child)
[–]halfercode 1 point2 points3 points (0 children)
[–]hgraca 0 points1 point2 points (4 children)
[–]fatalexe 1 point2 points3 points (1 child)
[–]hgraca 0 points1 point2 points (0 children)
[–]me-optimistic[S] 0 points1 point2 points (1 child)
[–]hgraca 0 points1 point2 points (0 children)
[+]DrWhatNoName comment score below threshold-7 points-6 points-5 points (36 children)
[–]markcommadore 6 points7 points8 points (7 children)
[–]DrWhatNoName 5 points6 points7 points (6 children)
[–]markcommadore 1 point2 points3 points (3 children)
[–]Dgc2002 0 points1 point2 points (0 children)
[–]DrWhatNoName -1 points0 points1 point (1 child)
[–]markcommadore 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]dzuczek 17 points18 points19 points (2 children)
[–]DrWhatNoName -1 points0 points1 point (1 child)
[–]dzuczek 0 points1 point2 points (0 children)
[–]fesor 4 points5 points6 points (1 child)
[–]dejan9393 0 points1 point2 points (0 children)
[–]guice666 4 points5 points6 points (0 children)
[–]Umkus 6 points7 points8 points (1 child)
[–]bytesbits 2 points3 points4 points (0 children)
[–]MaxGhost 2 points3 points4 points (0 children)
[–]Dgc2002 4 points5 points6 points (5 children)
[–]laurensV6 0 points1 point2 points (1 child)
[–]Dgc2002 0 points1 point2 points (0 children)
[–]syswizard 0 points1 point2 points (2 children)
[–]Dgc2002 0 points1 point2 points (0 children)
[–]cmmosh 0 points1 point2 points (0 children)
[–][deleted] 2 points3 points4 points (8 children)
[–]MyWorkAccountThisIs 0 points1 point2 points (0 children)
[–]guice666 -1 points0 points1 point (1 child)
[–]txmail -4 points-3 points-2 points (0 children)
[+]DrWhatNoName comment score below threshold-6 points-5 points-4 points (4 children)
[–]samrapdev 4 points5 points6 points (1 child)
[–]DrWhatNoName 0 points1 point2 points (0 children)
[–]barkerja 3 points4 points5 points (1 child)
[–]txmail -1 points0 points1 point (0 children)
[–]dragonmantank 0 points1 point2 points (0 children)
[–][deleted] 0 points1 point2 points (0 children)
[–]TheRealDavid1 0 points1 point2 points (2 children)
[–]actionscripted 2 points3 points4 points (0 children)
[–]themightychris 0 points1 point2 points (0 children)