-
Notifications
You must be signed in to change notification settings - Fork 16
Provide dockerfile with composer #22
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
base: master
Are you sure you want to change the base?
Conversation
0x20h
left a comment
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.
First review
| Start testing via the following: | ||
| ``` | ||
| docker build -t sofortlib . | ||
| docker run -ti -v $(pwd):/app sofortlib bash -c "composer install && vendor/bin/phpunit" |
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.
docker run sofortlib sould be sufficient here as you add the lib on build time, correct?
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.
You could run it like that to have all tests run, correct. But think about someone who'd like to somehow "interact" with the code... you run unit tests by building the container, that should be quite sufficient to run it afterwards and edit files.
But by mounting your files into the container, you could simply use it e.g. for development reasons
Dockerfile
Outdated
| @@ -0,0 +1,19 @@ | |||
| FROM ubuntu:16.04 | |||
|
|
|||
| RUN apt-get update && apt-get install -y \ | |||
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.
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get ins...
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.
added
Just for convenience: Dockerfile with PHP7 for testing purposes
You simply need Docker installed on your machine to start testing