Deploying a Website using Docker

1). First image your server with a pre-built docker image or follow the instructions below to install manually:

A). yum install -y yum-utils device-mapper-persistent-data lvm2
B). yum-config-manager –add-repo
C). yum install docker
D). systemctl start docker
E). systemctl enable docker

2). cd /opt
3). sudo curl -L$(uname -s)-$(uname -m) -o /usr/local/bin/docker-compose
4). chmod +x /usr/local/bin/docker-compose
5). yum install git
6). git clone
7). cd devilbox
8). cp env-example .env
9). vi .env
Edit and set the following:

Change additional values for programs and the versions that you want, for example:

10). docker-compose up -d
11). Login using your IP with username: devilbox and the password set in step 9.

12). Create a site:
mkdir -p /opt/devilbox/data/www/mydomain-without-the-dotcom/htdocs

13). Transfer existing Website or installation files into the folder created.


Website data will be located in: /opt/devilbox/data/www

MySQL data will be located in: /var/lib/docker/volumes/devilbox_devilbox-mysql-5.7 (Note that the path will change after volume if a different MySQL or MariaDB version is used instead.)

Marv has written 28 articles

One thought on “Deploying a Website using Docker

Leave a Reply

Your email address will not be published. Required fields are marked *

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <s> <strike> <strong>