

In this tutorial we will use only the first two. There are three main stanzas we can use in the configuration file: services, volumes and networks.Įach section is used to configure the corresponding aspect of a project. Inside the linuxconfig directory, we define the docker-compose configuration for our project inside a yaml file, which by default should be called docker-compose.yml.

We can create both directories at once using the -p option of the mkdir command: $ mkdir -p linuxconfig/DocumentRoot Inside this directory we will create another one, DocumentRoot, which will host our website files. For the sake of this article we will call it linuxconfig. The first step in our journey consists into the creation of the directory we will use as the root of our project. We can perform both operations with one single command: $ systemctl enable -now docker We can install them via apt: $ sudo apt install docker docker-composeĪfter the installation is performed we must start the docker service and enable it at boot. Both packages are available in the Ubuntu official repositories. In order to create a Docker-based LAMP stack on Ubuntu 20.04 Focal Fossa, the first thing we have to do is to install the software we need: docker itself, and docker-compose, which is an utility that let us easily organize multi-container applications using yaml configuration files. Installing packages and starting the docker service.

$ – requires given linux commands to be executed as a regular non-privileged user # – requires given linux commands to be executed with root privileges either directly as a root user or by use of sudo command Root permissions to build docker containers and launch the docker service Installed Ubuntu 20.04 or Upgraded Ubuntu to 20.04 Focal Fossa Requirements, Conventions or Software Version Used Software Requirements and Conventions Used Software Requirements and Linux Command Line Conventions Category
Bitnami mean stack document root how to#
How to create a docker based LAMP stack using docker on Ubuntu 20.04
