This repository has been archived by the owner on Mar 16, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 75
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Composer installation in dockerfile fixed
- Loading branch information
Paramtamtam
committed
Jan 24, 2019
1 parent
47b3723
commit 93c8031
Showing
3 changed files
with
46 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,18 @@ | ||
root = true | ||
|
||
[*] | ||
charset=utf-8 | ||
end_of_line=lf | ||
insert_final_newline=false | ||
indent_style=space | ||
indent_size=4 | ||
|
||
[{*.yml,*.yaml}] | ||
indent_style=space | ||
indent_size=2 | ||
charset = utf-8 | ||
end_of_line = lf | ||
insert_final_newline = true | ||
indent_style = space | ||
indent_size = 4 | ||
trim_trailing_whitespace = true | ||
|
||
[*.{md,json}] | ||
trim_trailing_whitespace = false | ||
|
||
[*.{yml,yaml,sh,conf}] | ||
indent_size = 2 | ||
|
||
[Makefile] | ||
indent_style = tab |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,26 @@ | ||
FROM composer:1.8.0 AS composer | ||
|
||
FROM phppm/nginx:latest | ||
LABEL Description="Mikrotik hosts parser application container" | ||
|
||
ENV COMPOSER_ALLOW_SUPERUSER="1" \ | ||
COMPOSER_HOME="/tmp/composer" \ | ||
PS1='\[\033[1;32m\]🐳 \[\033[1;36m\][\u@\h] \[\033[1;34m\]\w\[\033[0;35m\] \[\033[1;36m\]# \[\033[0m\]' | ||
|
||
COPY --from=composer /usr/bin/composer /usr/bin/composer | ||
COPY . /app/src | ||
|
||
WORKDIR /app/src | ||
|
||
RUN \ | ||
echo -e "\n\ | ||
alias ls='ls --color=auto';\n\ | ||
export PS1='\[\e[1;31m\]\$(echo \"[\"\${?/0/}\"]\" | sed \"s/\\[\\]//\")\$(echo \"\[\e[32m\][hosts-parser] \ | ||
\[\e[37m\]\")\u@\h: \[\e[00m\]\w \\$ ';\n\n" >> /root/.bashrc \ | ||
&& php --version \ | ||
&& export COMPOSER_HOME="/usr/local/share" \ | ||
&& export COMPOSER_ALLOW_SUPERUSER="1" \ | ||
&& export PATH="$COMPOSER_HOME:$COMPOSER_HOME/vendor/bin:$PATH" \ | ||
&& php -r "copy('https://getcomposer.org/installer', '/tmp/composer-setup.php');" \ | ||
&& php -r "if(hash_file('SHA384','/tmp/composer-setup.php')==='544e09ee996cdf60ece3804abc52599c22b1f40f4323403c'.\ | ||
'44d44fdfdd586475ca9813a858088ffbc1f233e9b180f061'){echo 'Verified';}else{unlink('/tmp/composer-setup.php');}" \ | ||
&& php /tmp/composer-setup.php --filename=composer --install-dir=$COMPOSER_HOME \ | ||
&& rm -Rf /tmp/* \ | ||
&& $COMPOSER_HOME/composer --no-interaction global require 'hirak/prestissimo' \ | ||
&& composer install --no-interaction --no-suggest --no-dev \ | ||
&& composer clear-cache \ | ||
&& composer dump-autoload \ | ||
&& php ./artisan cache:clear | ||
RUN set -xe \ | ||
&& php --version \ | ||
&& rm -Rf /tmp/* \ | ||
&& composer global require 'hirak/prestissimo' --no-interaction --no-suggest --prefer-dist \ | ||
&& composer install --no-dev --no-interaction --no-ansi --no-suggest --prefer-dist \ | ||
&& composer clear-cache \ | ||
&& composer dump-autoload \ | ||
&& php ./artisan cache:clear | ||
|
||
VOLUME ["/app/src"] | ||
|
||
CMD ["--bootstrap=laravel", "--app-env=prod", "--workers=8", "--static-directory=public/"] | ||
CMD ["--bootstrap=laravel", "--app-env=prod", "--workers=4", "--static-directory=public/"] |