Skip to content

Commit 5f03437

Browse files
authored
Merge pull request dunglas#11 from kejwmen/feature/select-skeleton-version
Support building using specific symfony version
2 parents 27429c7 + 0ab47a2 commit 5f03437

File tree

3 files changed

+8
-2
lines changed

3 files changed

+8
-2
lines changed

Dockerfile

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,8 +39,11 @@ RUN composer global require "hirak/prestissimo:^0.3" --prefer-dist --no-progress
3939
ARG STABILITY=stable
4040
ENV STABILITY ${STABILITY}
4141

42+
# Allow to select skeleton version
43+
ARG VERSION=""
44+
4245
# Download the Symfony skeleton and leverage Docker cache layers
43-
RUN composer create-project "symfony/skeleton" . --stability=$STABILITY --prefer-dist --no-dev --no-progress --no-scripts --no-plugins --no-interaction
46+
RUN composer create-project "symfony/skeleton ${VERSION}" . --stability=$STABILITY --prefer-dist --no-dev --no-progress --no-scripts --no-plugins --no-interaction
4447

4548
###> recipes ###
4649
###< recipes ###

docker-compose.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,9 @@ services:
44
app:
55
build:
66
context: .
7+
args:
8+
VERSION: ${SYMFONY_VERSION}
9+
STABILITY: stable
710
volumes:
811
# Comment out the next line in production
912
- ./:/srv/app:rw

docker/app/docker-entrypoint.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ fi
99
if [ "$1" = 'php-fpm' ] || [ "$1" = 'bin/console' ]; then
1010
# The first time volumes are mounted, the project needs to be recreated
1111
if [ ! -f composer.json ]; then
12-
composer create-project "symfony/skeleton" tmp --stability=$STABILITY --prefer-dist --no-progress --no-interaction
12+
composer create-project "symfony/skeleton $VERSION" tmp --stability=$STABILITY --prefer-dist --no-progress --no-interaction
1313
cp -Rp tmp/. .
1414
rm -Rf tmp/
1515
elif [ "$APP_ENV" != 'prod' ]; then

0 commit comments

Comments
 (0)