Skip to content

Commit 575a8d1

Browse files
committed
feat: add docker for running composer
1 parent 9fde1e0 commit 575a8d1

File tree

3 files changed

+24
-1
lines changed

3 files changed

+24
-1
lines changed

Dockerfile.composer

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
FROM designmynight/php7.1-cli-mongo
2+
3+
WORKDIR /opt
4+
5+
RUN apk add --no-cache libpng libpng-dev && docker-php-ext-install gd && apk del libpng-dev
6+
7+
RUN docker-php-ext-install pcntl
8+
9+
COPY --from=composer:1.6 /usr/bin/composer /usr/bin/composer
10+
11+
RUN /usr/bin/composer global require hirak/prestissimo
12+
13+
COPY composer.json /opt

composer.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
"require": {
1616
"illuminate/support": "^5.5",
1717
"jenssegers/mongodb": "3.3.* || 3.4.* || 3.5.*",
18-
"laravel/passport": "4.0.* || 5.0.* || 6.0.* || 7.0.* || dev*"
18+
"laravel/passport": "4.0.* || 5.0.* || 6.0.* || 7.0.*"
1919
},
2020
"autoload": {
2121
"psr-4": {

docker-compose.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
version: '3'
2+
services:
3+
composer:
4+
build:
5+
context: .
6+
dockerfile: Dockerfile.composer
7+
command: composer -o install
8+
volumes:
9+
- .:/opt
10+
working_dir: /opt

0 commit comments

Comments
 (0)