Skip to content

Commit

Permalink
Add Dockerfile and docker-compose
Browse files Browse the repository at this point in the history
  • Loading branch information
hmazter committed Jan 24, 2019
1 parent 00d84f5 commit 3463ad0
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 0 deletions.
10 changes: 10 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -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
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
10 changes: 10 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
version: "3"

services:
console:
image: hmazter/console-skeleton:latest
build:
context: .
dockerfile: Dockerfile
volumes:
- ".:/app"

0 comments on commit 3463ad0

Please sign in to comment.