Skip to content

Commit 76a3140

Browse files
committed
fixed composer auth token
1 parent 437bfbf commit 76a3140

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

docker-compose.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ services:
44
php:
55
build:
66
dockerfile: Dockerfile-fpm
7-
context: 'php-7.0'
7+
context: 'php-7.1'
88
args:
99
- GITHUB_API_TOKEN=${GITHUB_API_TOKEN}
1010
image: ${STACK_PHP_IMAGE}
@@ -24,7 +24,7 @@ services:
2424
php-alpine:
2525
build:
2626
dockerfile: Dockerfile-fpm-alpine
27-
context: 'php-7.0'
27+
context: 'php-7.1'
2828
image: ${STACK_PHP_IMAGE}-alpine
2929
volumes:
3030
- ./test:/test

php-7.1/Dockerfile-fpm

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -67,8 +67,7 @@ COPY image-files/ /
6767

6868
# Add GITHUB_API_TOKEN support for composer
6969
ARG GITHUB_API_TOKEN
70-
RUN echo "alias composer='composer.phar'" >> /root/.bashrc && \
71-
chmod 700 \
70+
RUN chmod 700 \
7271
/usr/local/bin/docker-entrypoint.sh \
7372
/usr/local/bin/docker-run.sh \
7473
/usr/local/bin/composer

php-7.1/Dockerfile-fpm-alpine

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,7 @@ ENV PHP_USER_ID=33 \
8888
COPY image-files/ /
8989

9090
# Add GITHUB_API_TOKEN support for composer
91-
RUN echo "alias composer='composer.phar'" >> /root/.bashrc && \
92-
chmod 700 \
91+
RUN chmod 700 \
9392
/usr/local/bin/docker-entrypoint.sh \
9493
/usr/local/bin/docker-run.sh \
9594
/usr/local/bin/composer

test/prod.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,9 @@ docker-compose run --rm ${PHP_SERVICE} php --version
88

99
# better check loaded module list
1010
docker-compose run --rm ${PHP_SERVICE} php -m | grep -i opcache
11+
12+
# check composer auth
13+
docker-compose run --rm ${PHP_SERVICE} sh -c '\
14+
composer && \
15+
[ -f ~/.composer/auth.json ] || exit 1 \
16+
'

0 commit comments

Comments
 (0)