Self Service password (PHP, LDAP, and Windows AD)

Self Service Password


Docker USER and named volume

To secure docker, we use a specific user instead of root. We add the following code in Dockerfile.

RUN useradd -u 2000 wwwuser
USER wwwuser

Those code create user with uid=2000.
Since host volume is mounted as root user, all files and folders is readonly for user wwwuser. If the wwwuser needs to write files to volume, we can create a named volume for it.

docker volume create --driver local --opt type=tmpfs --opt device=tmpfs  --opt o=uid=2000,gid=2000,size=2g,mode=0750 myHomeVolume

Use the following command to run container

docker run -d -v myHomeVolume:/home/wwwuser --name myapps <image>

TO backup the data, taring all files at ‘/var/lib/docker/volumes/myHomeVolume/_data’ with root.

SMTP setting for Drupal, Django, and WordPress

Drupal, Django, and WordPress are using localhost as SMTP server by default. But there is a way to use another SMTP server to send email.

How to install MariaDB on CentOS

Goto and select version to generate repository file. For version 10.1, the file content as blow:

# MariaDB 10.1 CentOS repository list - created 2016-11-04 03:20 UTC
name = MariaDB
baseurl =

Installation command:

sudo yum install MariaDB-server MariaDB-client

Command to secure Mysql (By default, root doesn’t have password)

sudo service mariadb start
sudo mysql_secure_installation