This repository has been archived by the owner on Jan 21, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 50
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Incorporated suggestions from @thomasvargiu for Docker
- Loading branch information
1 parent
a6b1272
commit 32cec04
Showing
6 changed files
with
35 additions
and
36 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,11 +1,24 @@ | ||
FROM php:latest | ||
RUN apt-get update | ||
RUN apt-get --yes install vim | ||
RUN apt-get --yes install git | ||
RUN apt-get --yes install inetutils-ping | ||
RUN apt-get --yes install host | ||
ARG PHP_VERSION=7.2 | ||
FROM php:${PHP_VERSION}-alpine | ||
|
||
RUN apk add --no-cache \ | ||
autoconf \ | ||
make \ | ||
g++ \ | ||
bash | ||
|
||
RUN pecl install mongodb && docker-php-ext-enable mongodb | ||
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" | ||
RUN php composer-setup.php | ||
RUN php -r "unlink('composer-setup.php');" | ||
RUN mv composer.phar /bin/composer | ||
RUN set -o pipefail && curl -sS https://getcomposer.org/installer | php -- --install-dir=/usr/local/bin --filename=composer | ||
RUN echo -e '#!/bin/sh' > /usr/local/bin/entrypoint.sh \ | ||
&& echo -e 'while ! nc -z ${MONGO_HOST:-mongo} ${MONGO_PORT:-27017}; do sleep 1; done' >> /usr/local/bin/entrypoint.sh \ | ||
&& echo -e 'exec "$@"' >> /usr/local/bin/entrypoint.sh \ | ||
&& chmod +x /usr/local/bin/entrypoint.sh | ||
WORKDIR /docker | ||
ENTRYPOINT ["/usr/local/bin/entrypoint.sh"] | ||
CMD ["./vendor/bin/phpunit"] | ||
|
||
# RUN apt-get update | ||
# RUN apt-get --yes install vim | ||
# RUN apt-get --yes install git | ||
# RUN apt-get --yes install inetutils-ping | ||
# RUN apt-get --yes install host |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters