Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
Marcelo Silva
drupal9-docker-app
Commits
adfc7412
Commit
adfc7412
authored
Mar 02, 2020
by
Ricardo Amaro
Browse files
Updated to ubuntu:eoan
parent
14d880a0
Changes
3
Hide whitespace changes
Inline
Side-by-side
Dockerfile
View file @
adfc7412
FROM
ubuntu:
bionic
FROM
ubuntu:
eoan
MAINTAINER
Ricardo Amaro <mail_at_ricardoamaro.com>
ENV
DEBIAN_FRONTEND noninteractive
ARG
DRUPALVER=9.0.x
RUN
apt-get update
;
\
dpkg-divert
--local
--rename
--add
/sbin/initctl
;
\
...
...
@@ -28,7 +29,7 @@ RUN echo "export VISIBLE=now" >> /etc/profile; \
# Install Composer, drush and drupal console
RUN
curl
-sS
https://getcomposer.org/installer | php
--
--install-dir
=
/usr/local/bin
--filename
=
composer
\
&&
HOME
=
/ /usr/local/bin/composer global require drush/drush:~
8
\
&&
HOME
=
/ /usr/local/bin/composer global require drush/drush:~
10
\
&&
ln
-s
/.composer/vendor/drush/drush/drush /usr/local/bin/drush
\
&&
curl https://drupalconsole.com/installer
-L
-o
/usr/local/bin/drupal
\
&&
chmod
+x /usr/local/bin/drupal
\
...
...
@@ -46,15 +47,17 @@ ADD ./files/xdebug.ini /etc/php/7.2/mods-available/xdebug.ini
RUN
a2ensite 000-default
;
a2enmod rewrite vhost_alias
# Drupal new version, clean cache
ADD
https://updates.drupal.org/release-history/drupal/8.x /tmp/latest.xml
ADD
https://updates.drupal.org/release-history/drupal/${DRUPALVER} /tmp/latest.xml
RUN
echo
"DRUPAL:
${
DRUPALVER
}
"
# Retrieve drupal & adminer
RUN
/bin/bash
-t
\
&&
cd
/var/www/html
;
drush
-v
dl drupal
--default-major
=
8
--drupal-project-rename
=
"web"
\
&&
cd
/var/www/html
;
chmod
a+w web/sites/default
;
\
mkdir
web/sites/default/files
;
chown
-R
www-data:www-data /var/www/html/
;
\
chmod
-R
ug+w /var/www/html/
;
\
wget
"http://www.adminer.org/latest.php"
-O
/var/www/html/web/adminer.php
RUN
cd
/var/www/html
;
git clone
--depth
1
--single-branch
-b
${
DRUPALVER
}
\
https://git.drupalcode.org/project/drupal.git web
&&
cd
web
;
composer
install
\
&&
cd
/var/www/html
;
chmod
a+w web/sites/default
;
\
mkdir
web/sites/default/files
;
chown
-R
www-data:www-data /var/www/html/
;
\
chmod
-R
ug+w /var/www/html/
;
\
wget
"http://www.adminer.org/latest.php"
-O
/var/www/html/web/adminer.php
# Set some permissions
RUN
mkdir
-p
/var/run/mysqld
;
\
...
...
files/start.sh
View file @
adfc7412
...
...
@@ -25,8 +25,10 @@ supervisord -c /etc/supervisor/conf.d/supervisord.conf -l /tmp/supervisord.log
if
[
!
-f
${
DOCROOT
}
/index.php
]
;
then
echo
"**** No Drupal found. Downloading latest to
${
DOCROOT
}
/ ****"
cd
${
BASEHTML
}
;
${
DRUSH
}
-vy
dl drupal
\
--default-major
=
${
DRUPALVER
}
--drupal-project-rename
=
"web"
# ${DRUSH} -vy dl drupal --default-major=${DRUPALVER} --drupal-project-rename="web"
git clone
--depth
1
--single-branch
-b
${
DRUPALVER
}
\
https://git.drupalcode.org/project/drupal.git web
;
cd
web
;
composer
install
chmod
a+w
${
DOCROOT
}
/sites/default
;
mkdir
${
DOCROOT
}
/sites/default/files
;
wget
"http://www.adminer.org/latest.php"
-O
${
DOCROOT
}
/adminer.php
...
...
files/supervisord.conf
View file @
adfc7412
...
...
@@ -21,7 +21,7 @@ autorestart=true
stdout_events_enabled
=
true
[
program
:
mysqld
]
command
=/
usr
/
bin
/
pidproxy
/
var
/
run
/
mysqld
/
mysqld
.
pid
/
usr
/
bin
/
mysqld_safe
--
socket
/
var
/
run
/
mysqld
/
mysqld
.
sock
> /
dev
/
null
command
=/
usr
/
bin
/
pidproxy
/
var
/
run
/
mysqld
/
mysqld
.
pid
/
usr
/
bin
/
mysqld_safe
autostart
=
true
autorestart
=
true
...
...
@@ -31,14 +31,3 @@ stopsignal=6
[
program
:
memcached
]
command
=/
usr
/
bin
/
memcached
-
p
11211
-
u
www
-
data
-
m
64
-
c
1024
-
t
4
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment