Skip to content

Commit c0a1470

Browse files
committed
*
1 parent 50df091 commit c0a1470

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

commands/start.go

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -277,7 +277,7 @@ func doPhpBuild() {
277277
packageList = append(packageList, "supervisor")
278278
}
279279

280-
npmInstallGlobal = append(npmInstallGlobal, "grunt-cli", "yargs", "async", "sass", "gulp", "requirejs", "pm2", "uglify-js", "typescript", "eslint")
280+
npmInstallGlobal = append(npmInstallGlobal, "npm", "grunt-cli", "yargs", "async", "sass", "gulp", "requirejs", "pm2", "uglify-js", "typescript", "eslint")
281281

282282
if os.Getenv("XDEBUG") == "yes" {
283283
if os.Getenv("PHP_VERSION") != "5.6" && os.Getenv("PHP_VERSION") != "7.0" {
@@ -348,6 +348,12 @@ func doPhpBuild() {
348348
util.Sed("__SYMFONY_CLI__", "\\", "config/php/Dockerfile")
349349
}
350350

351+
if os.Getenv("PHP_VERSION") == "5.6" || os.Getenv("PHP_VERSION") == "7.0" {
352+
util.Sed("__CURL_INSECURE__", "-k", "config/php/Dockerfile")
353+
} else {
354+
util.Sed(" __CURL_INSECURE__", "", "config/php/Dockerfile")
355+
}
356+
351357
util.Sed(" \n", "", "config/php/Dockerfile")
352358
}
353359

config/php/Dockerfile.build

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -57,22 +57,25 @@ RUN docker-php-ext-configure zip --with-libzip && docker-php-ext-configure gd --
5757
&& chown ${USER_ID}:${GROUP_ID} /var/www \
5858
# npm & node
5959
&& mkdir -p /var/www/.npm \
60+
&& mkdir -p /var/www/html \
61+
&& printf '{"name": "d4d", "version": "1.0.0"}' > /var/www/html/package.json \
6062
&& chown -R ${USER_ID}:${GROUP_ID} /var/www/.npm \
63+
&& chown -R ${USER_ID}:${GROUP_ID} /var/www/html \
6164
&& printf 'Package: *\nPin: origin deb.nodesource.com\nPin-Priority: 600' > /etc/apt/preferences.d/nodejs \
6265
&& curl -sL https://deb.nodesource.com/setup_${NODE_JS_VERSION} | bash \
6366
&& apt-get install -y nodejs \
64-
&& npm install -g __NPM_INSTALL_GLOBAL__ \
67+
&& npm install --location=global __NPM_INSTALL_GLOBAL__ \
6568
# Yarn package manager
6669
# bugfix: remove cmdtest to install yarn correctly.
6770
__YARN__ \
6871
# Install wkhtmltopdf
6972
__WKHTMLTOPDF__ \
7073
__PHP_IONCUBE__ \
7174
__BLACKFIRE__ \
72-
&& curl -L https://cs.symfony.com/download/php-cs-fixer-v3.phar -o /usr/bin/php-cs-fixer && chmod a+x /usr/bin/php-cs-fixer \
73-
&& curl -L https://github.com/fabpot/local-php-security-checker/releases/download/v2.0.3/local-php-security-checker_2.0.3_linux_amd64 -o /usr/bin/local-php-security-checker && chmod a+x /usr/bin/local-php-security-checker \
74-
&& curl -L https://github.com/phpstan/phpstan/raw/1.7.15/phpstan.phar -o /usr/local/bin/phpstan && chmod a+x /usr/local/bin/phpstan \
75-
&& curl -L https://deployer.org/deployer.phar -o /usr/local/bin/dep && chmod a+x /usr/local/bin/dep \
75+
&& curl -L __CURL_INSECURE__ https://cs.symfony.com/download/php-cs-fixer-v3.phar -o /usr/bin/php-cs-fixer && chmod a+x /usr/bin/php-cs-fixer \
76+
&& curl -L __CURL_INSECURE__ https://github.com/fabpot/local-php-security-checker/releases/download/v2.0.3/local-php-security-checker_2.0.3_linux_amd64 -o /usr/bin/local-php-security-checker && chmod a+x /usr/bin/local-php-security-checker \
77+
&& curl -L __CURL_INSECURE__ https://github.com/phpstan/phpstan/raw/1.7.15/phpstan.phar -o /usr/local/bin/phpstan && chmod a+x /usr/local/bin/phpstan \
78+
&& curl -L __CURL_INSECURE__ https://deployer.org/deployer.phar -o /usr/local/bin/dep && chmod a+x /usr/local/bin/dep \
7679

7780
&& apt-get remove --purge -y gnupg1 \
7881
&& apt-get -y --purge autoremove \

0 commit comments

Comments
 (0)