Created
December 13, 2018 12:04
-
-
Save srmklive/36503506fae68a92e028b75decc05729 to your computer and use it in GitHub Desktop.
Install Nginx, PHP 7.2, NodeJS, Yarn & Composer in Ubuntu 16.04 & 18.04
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
apt-get update \ | |
&& apt-get -y upgrade | |
add-apt-repository ppa:nginx/stable \ | |
&& add-apt-repository ppa:ondrej/php \ | |
&& curl -sL https://deb.nodesource.com/setup_8.x | bash - \ | |
&& curl -sS https://dl.yarnpkg.com/debian/pubkey.gpg | apt-key add - \ | |
&& echo "deb https://dl.yarnpkg.com/debian/ stable main" | tee /etc/apt/sources.list.d/yarn.list \ | |
&& apt-get update | |
apt-get -y install nginx nodejs yarn libpcre3 libssl1.1 openssl php7.2-fpm php7.2-cli php7.2-curl php7.2-mbstring \ | |
php7.2-json php7.2-mysql php7.2-pgsql php7.2-gd php7.2-bcmath php7.2-readline \ | |
php7.2-zip php7.2-imap php7.2-xml php7.2-json php7.2-intl php7.2-soap \ | |
php7.2-memcached php-xdebug | |
php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');" \ | |
&& php -r "if (hash_file('SHA384', 'composer-setup.php') === '93b54496392c062774670ac18b134c3b3a95e5a5e5c8f1a9f115f203b75bf9a129d5daa8ba6a13e2cc8a1da0806388a8') { echo 'Installer verified'; } else { echo 'Installer corrupt'; unlink('composer-setup.php'); } echo PHP_EOL;" \ | |
&& php composer-setup.php --install-dir=/usr/bin --filename=composer \ | |
&& php -r "unlink('composer-setup.php');" | |
RUN apt-get -y autoclean \ | |
&& apt-get -y autoremove |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment