diff --git a/Dockerfile b/Dockerfile new file mode 100644 index 0000000..9c08183 --- /dev/null +++ b/Dockerfile @@ -0,0 +1,10 @@ +FROM php:7.3-alpine + +RUN curl -o /usr/local/bin/composer https://getcomposer.org/composer.phar \ + && chmod +x /usr/local/bin/composer + +COPY . /app + +WORKDIR /app + +RUN composer install --no-dev \ No newline at end of file diff --git a/README.md b/README.md index 1cc350f..7f168f3 100644 --- a/README.md +++ b/README.md @@ -21,11 +21,27 @@ The skeleton can then be executed with: ./app ``` +### Running with docker + +Build the app with: +```bash +docker-compose build +``` + +And run the app with docker with this command: +```bash +docker-compose run console ./app +``` + +### Tests + Tests can be run with: ```bash composer test ``` +### Continue building + Go ahead and: * Edit/replace command in src/Commad/ExampleCommand * Add more commands in src/Command diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..34b8cef --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,10 @@ +version: "3" + +services: + console: + image: hmazter/console-skeleton:latest + build: + context: . + dockerfile: Dockerfile + volumes: + - ".:/app" \ No newline at end of file