Skip to content

Commit

Permalink
Removed the unrequired statements.
Browse files Browse the repository at this point in the history
1. Removed statement creating symlink to drupal tool.
2. Added latest composer install steps mentioned on https://getcomposer.org/download/
3. Updated composer.json dependencies with latest versions being used in Open Social.
  • Loading branch information
navneet0693 committed Jun 7, 2022
1 parent 55d86cd commit 0e5665f
Show file tree
Hide file tree
Showing 4 changed files with 23 additions and 21 deletions.
9 changes: 5 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM drupal:9.3-php8.0-fpm
FROM drupal:9.3.15-php8.0
MAINTAINER [email protected]

# Install packages.
Expand Down Expand Up @@ -28,8 +28,9 @@ RUN docker-php-ext-install zip bcmath exif sockets

# Install Composer.
RUN php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" && \
php composer-setup.php && \
mv composer.phar /usr/local/bin/composer && \
php -r "if (hash_file('sha384', 'composer-setup.php') === '55ce33d7678c5a611085589f1f3ddf8b3c52d662cd01d4ba75c0ee0459970c2200a51f492d557530c71c15d8dba01eae') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" && \
php composer-setup.php && \
mv composer.phar /usr/local/bin/composer && \
php -r "unlink('composer-setup.php');"


Expand All @@ -46,7 +47,7 @@ WORKDIR /var/www/html/
RUN chown -R www-data:www-data *

# Install Drush launcher.
RUN wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.4.2/drush.phar && \
RUN wget -O drush.phar https://github.com/drush-ops/drush-launcher/releases/download/0.10.1/drush.phar && \
chmod +x drush.phar && \
mv drush.phar /usr/local/bin/drush

Expand Down
3 changes: 1 addition & 2 deletions ci/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM goalgorilla/open_social_docker:latest
FROM goalgorilla/open_social_docker:d9
MAINTAINER [email protected]

# Specify the work directory.
Expand All @@ -20,7 +20,6 @@ RUN composer install --prefer-dist --no-interaction
# Unfortunately, adding the composer vendor dir to the PATH doesn't seem to work. So:
RUN ln -s /root/.composer/vendor/bin/behat /usr/local/bin/behat
RUN ln -s /root/.composer/vendor/bin/phpunit /usr/local/bin/phpunit
RUN ln -s /var/www/vendor/bin/drupal /usr/local/bin/drupal

### CI SPECIFIC - END ###

Expand Down
7 changes: 4 additions & 3 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
"drupal/redis": "^1.5",
"drush/drush": "11.*@stable",
"goalgorilla/open_social": "dev-feature/3260861-php-8-support-updated-branch",
"goalgorilla/open_social_scripts": "^3.0"
"goalgorilla/open_social_scripts": "dev-internal/update-docker"
},
"require-dev": {
"dealerdirect/phpcodesniffer-composer-installer": "~0.7.1",
Expand All @@ -37,14 +37,15 @@
"drupal/upgrade_status": "^3.11",
"jcalderonzumba/gastonjs": "~1.2.0",
"jcalderonzumba/mink-phantomjs-driver": "~0.3.3",
"phpstan/phpstan": "1.4.6",
"mglaman/phpstan-drupal": "1.1.12",
"phpstan/phpstan": "1.7.1",
"mglaman/phpstan-drupal": "1.1.17",
"mikey179/vfsstream": "^1.6",
"palantirnet/drupal-rector": "^0.12",
"phpmd/phpmd": "^2.10",
"phpspec/prophecy-phpunit": "^2.0",
"phpstan/extension-installer": "^1.1",
"phpstan/phpstan-deprecation-rules": "^1.0",
"phpstan/phpstan-phpunit": "1.1.1",
"slevomat/coding-standard": "^7.0",
"squizlabs/html_codesniffer": "*",
"symplify/easy-coding-standard": "^9.4"
Expand Down
25 changes: 13 additions & 12 deletions dev/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
FROM goalgorilla/open_social_docker:latest
FROM goalgorilla/open_social_docker:d9
MAINTAINER [email protected]

### CI SPECIFIC - START ###
Expand All @@ -13,7 +13,6 @@ RUN composer install --prefer-dist --no-interaction
# Unfortunately, adding the composer vendor dir to the PATH doesn't seem to work. So:
RUN ln -s /root/.composer/vendor/bin/behat /usr/local/bin/behat
RUN ln -s /root/.composer/vendor/bin/phpunit /usr/local/bin/phpunit
RUN ln -s /var/www/vendor/bin/drupal /usr/local/bin/drupal

### CI SPECIFIC - END ###

Expand All @@ -37,22 +36,24 @@ RUN pecl install xdebug-3.1.1 && \
sed -i '1 a xdebug.idekey=PHPSTORMi' /usr/local/etc/php/conf.d/docker-php-ext-xdebug.ini

# Blackfire
RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
&& architecture=$(uname -m) \
&& curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \
&& mkdir -p /tmp/blackfire \
&& tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
&& mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \
&& printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8307\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
&& rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz
# @todo Fix PHP 8 based blackfire installation
#RUN version=$(php -r "echo PHP_MAJOR_VERSION.PHP_MINOR_VERSION;") \
# && architecture=$(uname -m) \
# && curl -A "Docker" -o /tmp/blackfire-probe.tar.gz -D - -L -s https://blackfire.io/api/v1/releases/probe/php/linux/$architecture/$version \
# && mkdir -p /tmp/blackfire \
# && tar zxpf /tmp/blackfire-probe.tar.gz -C /tmp/blackfire \
# && mv /tmp/blackfire/blackfire-*.so $(php -r "echo ini_get ('extension_dir');")/blackfire.so \
# && printf "extension=blackfire.so\nblackfire.agent_socket=tcp://blackfire:8307\n" > $PHP_INI_DIR/conf.d/blackfire.ini \
# && rm -rf /tmp/blackfire /tmp/blackfire-probe.tar.gz

RUN php -r "opcache_reset();"

# @todo Remove these steps as it is not required for latest Docker desktop.
# Contains the Mac hack to get the permissions to work for development.
# Set user 1000 and group staff to www-data, enables write permission.
# https://github.com/boot2docker/boot2docker/issues/581#issuecomment-114804894
RUN usermod -u 1000 www-data
RUN usermod -G staff www-data
#RUN usermod -u 1000 www-data
#RUN usermod -G staff www-data

### DEV SPECIFIC - END ###

Expand Down

0 comments on commit 0e5665f

Please sign in to comment.