carlosreig / docker-lamp Goto Github PK
View Code? Open in Web Editor NEWA few scripts that use docker to create as many LAMP environments as you want very easily
A few scripts that use docker to create as many LAMP environments as you want very easily
The included script for installing Drupal 7 fails, seemingly due to a version mismatch between PHP and pecl/xdebug.
Clone the repo
Executestart.sh
Executescripts/install_drupal7.sh
#0 109.9 pecl/xdebug requires PHP (version >= 8.0.0, version <= 8.2.99), installed version is 7.4.33
#0 109.9 No valid packages found
#0 109.9 install failed
starting the container enters a loop on trying to install packages.
Below messages from terminal.
$ ./start.sh
Building web
Step 1/9 : FROM php:7.3-apache-stretch
---> 140355f5aa2b
Step 2/9 : RUN useradd -u 1000 -m www-bridge-user
---> Using cache
---> 118681a80d1d
Step 3/9 : RUN apt-get update
---> Using cache
---> 2903a43ceb8f
Step 4/9 : RUN apt-get install -y git wget zlib1g-dev zip vim mysql-client libpng-dev libmcrypt-dev libicu-dev nodejs libzip-dev libfreetype6-dev libjpeg62-turbo-dev gnupg2 ssmtp && pecl install mcrypt-1.0.2 && apt-get install -y libmagickwand-dev --no-install-recommends && docker-php-ext-install mbstring && docker-php-ext-install pdo_mysql && docker-php-ext-install mysqli && docker-php-ext-enable mcrypt && docker-php-ext-install opcache && docker-php-ext-install pcntl && docker-php-ext-install intl && docker-php-ext-install zip && docker-php-ext-configure gd --with-freetype-dir=/usr/include/ --with-jpeg-dir=/usr/include/ && docker-php-ext-install gd && pecl install imagick && docker-php-ext-enable imagick && rm -r /var/lib/apt/lists/* && curl -sS https://getcomposer.org/installer | php && mv composer.phar /usr/bin/composer && pecl install xdebug && a2enmod rewrite && a2enmod ssl && a2ensite default-ssl && curl -sL https://deb.nodesource.com/setup_12.x | bash -
---> Running in dc93757f045b
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
default-mysql-client dirmngr git-man gnupg gnupg-agent gnupg-l10n
icu-devtools less libaio1 libassuan0 libconfig-inifiles-perl libcurl3-gnutls
libdbd-mysql-perl libdbi-perl liberror-perl libfreetype6 libgnutls-openssl27
libgpm2 libjemalloc1 libjpeg62-turbo libksba8 libmariadbclient18 libmcrypt4
libnpth0 libpng-tools libpng16-16 libpopt0 libreadline5 libreadline7
libterm-readkey-perl libuv1 libx11-6 libx11-data libxau6 libxcb1 libxdmcp6
libxext6 libxmuu1 libzip4 mariadb-client-10.1 mariadb-client-core-10.1
mariadb-common mysql-common openssh-client pinentry-curses readline-common
rsync unzip vim-common vim-runtime xauth xxd
Suggested packages:
dbus-user-session libpam-systemd pinentry-gnome3 tor gettext-base
git-daemon-run | git-daemon-sysvinit git-doc git-el git-email git-gui gitk
gitweb git-arch git-cvs git-mediawiki git-svn parcimonie xloadimage scdaemon
libclone-perl libmldbm-perl libnet-daemon-perl libsql-statement-perl gpm
icu-doc mcrypt keychain libpam-ssh monkeysphere ssh-askpass pinentry-doc
readline-doc openssh-server ctags vim-doc vim-scripts
The following NEW packages will be installed:
default-mysql-client dirmngr git git-man gnupg gnupg-agent gnupg-l10n gnupg2
icu-devtools less libaio1 libassuan0 libconfig-inifiles-perl libcurl3-gnutls
libdbd-mysql-perl libdbi-perl liberror-perl libfreetype6 libfreetype6-dev
libgnutls-openssl27 libgpm2 libicu-dev libjemalloc1 libjpeg62-turbo
libjpeg62-turbo-dev libksba8 libmariadbclient18 libmcrypt-dev libmcrypt4
libnpth0 libpng-dev libpng-tools libpng16-16 libpopt0 libreadline5
libreadline7 libterm-readkey-perl libuv1 libx11-6 libx11-data libxau6
libxcb1 libxdmcp6 libxext6 libxmuu1 libzip-dev libzip4 mariadb-client-10.1
mariadb-client-core-10.1 mariadb-common mysql-client mysql-common nodejs
openssh-client pinentry-curses readline-common rsync ssmtp unzip vim
vim-common vim-runtime wget xauth xxd zip zlib1g-dev
0 upgraded, 67 newly installed, 0 to remove and 6 not upgraded.
Need to get 61.7 MB of archives.
After this operation, 289 MB of additional disk space will be used.
Get:1 http://cdn-fastly.deb.debian.org/debian stretch/main amd64 libcurl3-gnutls amd64 7.52.1-5+deb9u9 [290 kB]
Get:28 http://security-cdn.debian.org/debian-security stretch/updates/main amd64 xxd amd64 2:8.0.0197-4+deb9u3 [132 kB]
As the php gd extension is configured after installing it.
So the installed one is configured without freetype and jpeg support.
I think you could add uploadprogress and remove vim (and maybe git as well?)
and in your php.ini I found this: date.timezone="Europe/London"
for me it's fine but I'm not sure about you ๐
and why do you use this directory /var/www/html (inside the docker)?
Apologies for this wall of text and questions :( but I like it! :D nice work mate!!
It would be nice to have the access and error Apache's logs somewhere accessible without having to open a bash session inside the docker container.
Proposed solution:
logs/
in the same level as www
is.gnupg/gnupg2 is needed before node setup as of 9.0 update
libpng12-dev no longer exists in upstream repo
L3 in scripts/install_drupal8.sh downloads drush 9 and therefore it breaks the L5 command as drush dl
used is deprecated in Drush 9.
PR and approach for the issue: #18
Reference: https://drushcommands.com/drush-9x/pm/pm:download/
Hi
Great work with this files! I tried other configs and this is the first that really work for me
I'm starting to use docker o create a dev enviroment
Now I want to use a persistent volume to store the mysql databases, do you know how can i do that? I added a volume on the docker-compose.yml file but I can't connect to database using the password defined on MYSQL_ROOT_PASSWORD constant
Thank you for your help and congrats for your work
Carlos
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.