forked from Codeception/Codeception
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Feature/docker support (Codeception#3067)
* added basic docker support * updated selenium container hostnames * added docker docs * added GitLab CI config * updated GitLab build jobs * updated GitLab reports * updated GitLab testing to run suites in parallel * removed fixed port * updated paths and test-stack configuration * removed GitLab configuration * updated testing examples and host-volume paths * reverted docker network host-names * ignore docker-compose config (.env) * updated Docker comments & commands * updated docs * updated PATH variable * build from PHP 7.0 * added Dockerfile maintainer * updated working dir config to use empty dir (host-volume) by default * moved local testing documentation to tests/ * fixed typo * fixed typo
- Loading branch information
Showing
5 changed files
with
178 additions
and
9 deletions.
There are no files selected for viewing
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 |
---|---|---|
@@ -0,0 +1,51 @@ | ||
FROM php:7.0-cli | ||
|
||
MAINTAINER Tobias Munk [email protected] | ||
|
||
# Install required system packages | ||
RUN apt-get update && \ | ||
apt-get -y install \ | ||
git \ | ||
zlib1g-dev \ | ||
libssl-dev \ | ||
--no-install-recommends && \ | ||
apt-get clean && \ | ||
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* | ||
|
||
# Install php extensions | ||
RUN docker-php-ext-install \ | ||
bcmath \ | ||
zip | ||
|
||
# Install pecl extensions | ||
RUN pecl install mongodb xdebug && \ | ||
docker-php-ext-enable mongodb && \ | ||
docker-php-ext-enable xdebug | ||
|
||
# Configure php | ||
RUN echo "date.timezone = UTC" >> /usr/local/etc/php/php.ini | ||
|
||
# Install composer | ||
ENV COMPOSER_ALLOW_SUPERUSER=1 | ||
RUN curl -sS https://getcomposer.org/installer | php -- \ | ||
--filename=composer \ | ||
--install-dir=/usr/local/bin | ||
RUN composer global require --optimize-autoloader \ | ||
"hirak/prestissimo" | ||
|
||
# Prepare application | ||
WORKDIR /repo | ||
|
||
# Install vendor | ||
COPY ./composer.json /repo/composer.json | ||
RUN composer install --prefer-dist --optimize-autoloader | ||
|
||
# Add source-code | ||
COPY . /repo | ||
|
||
ENV PATH /repo:${PATH} | ||
ENTRYPOINT ["codecept"] | ||
|
||
# Prepare host-volume working directory | ||
RUN mkdir /project | ||
WORKDIR /project |
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 |
---|---|---|
@@ -0,0 +1,13 @@ | ||
version: '2' | ||
services: | ||
codecept: | ||
image: testing/codeception/codeception | ||
build: .. | ||
working_dir: /repo | ||
volumes: | ||
- ../tests:/repo/tests | ||
- ../codeception.yml:/repo/codeception.yml | ||
- ../src:/repo/src | ||
- ../shim.php:/repo/shim.php | ||
#redis: | ||
# image: redis:3 |