-
Notifications
You must be signed in to change notification settings - Fork 7
Add docker image and dockerized dev tools #10
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think for most cases it's not practical to add unified development
environment to a library project. Code in a library is supposed to work
with several versions of PHP, dependencies, tools, etc. For this reason
we usually don't commit lock file in a library. I believe we should do
the same to our tools (for example we use PHP version constraint in
composer.json
).
I find proposed tooling a little bit cumbersome for such a small project
which is not actively developed. As a compromise I would suggest to put
the following script in the root of the project under the name
composer
and make it executable
#!/bin/sh -
exec docker run --rm -u "$(id -u):$(id -g)" -v "$PWD:/app" \
-v composer-home:/tmp composer:1.8 composer "$@"
This script allows to perform most of the usual tasks possibly except of
code coverage reporting (depends on the PHP version).
31b46d9
to
c017361
Compare
- quotes around phpunit args - use php 7.1 for image - remove unused volumes mounting for composer - clean apt-get lists Reorder RUN instuctions for best layers caching, remove unused packages.
c017361
to
e0e0945
Compare
Hi guys!
I'm don't have all stuff for run php projects locally. In my mind it be helpful for contributors with docker.