• Skip to secondary menu
  • Skip to main content
  • Skip to primary sidebar
  • Home
  • Projects
  • Products
  • Themes
  • Tools
  • Request for Quote

Vengala Vinay

Having 12+ Years of Experience in Software Development

  • Home
  • WordPress
  • PHP
    • Codeigniter
  • Django
  • Magento
  • Selenium
  • Server
Home » How to Install Magento 2.4.3 + elasticsearch Using Docker in Linode – Centos 8

How to Install Magento 2.4.3 + elasticsearch Using Docker in Linode – Centos 8

  • Step : 1 – Installing the PHP 7.4 and PHP Extenisons
  • Step : 2 – Installing the Global Composer
  • Step : 3 – Installing the docker Community Edition
  • Step : 4 – Create a magento project using the composer
  • Step : 5 – Installing the docker-compose
  • Step : 6 – Setting up the docker-compose.yml
  • Step : 7 – Running the docker build
  • Step : 8 – Magento Installation Setup using the Command line

Step : 1 – Installing the PHP 7.4 and PHP Extensions

To install and enable the EPEL Repository on CentOS 8, Execute the following dnf command

dnf install https://dl.fedoraproject.org/pub/epel/epel-release-latest-8.noarch.rpm

To confirm the presence of the EPEL Repository, run the following rpm command

rpm -qa | grep epel

Next, run the command below to add the REMI Repository

dnf install https://rpms.remirepo.net/enterprise/remi-release-8.rpm

To verify the existence of the REMI repository, run the command

rpm -qa | grep remi

Execute the below to get a list of available PHP module streams.

dnf module list php

From the output above,  now we are using the remi-7.4 as per our requirement. we are going to enable the module stream as shown below.

dnf module enable php:remi-7.4

Install the PHP and dependency extensions using the command below.

dnf install php php-cli php-common php-json php-gd php-sockets php-soap php-intl php-zip php-pdo_mysql

To check the version of PHP installed, run the command

php -v

 

Step : 2 – Installing the Global Composer

Download the composer installer script with:

php -r "copy('https://getcomposer.org/installer', 'composer-setup.php');"

Run the following command to install composer in the /usr/local/bin directory:

sudo php composer-setup.php --install-dir=/usr/local/bin --filename=composer

Verify the installation

composer

Step : 3 – Installing the docker Community Edition

Setup the docker repository by using yum-utilis (which provides the yum-config-manager) and setup the stable repository

sudo yum install -y yum-utils && yum-config-manager \
    --add-repo \
    https://download.docker.com/linux/centos/docker-ce.repo

Install the docker-ce

sudo yum install docker-ce docker-ce-cli containerd.io

Start the service

sudo systemctl start docker

Step : 4 – Create a magento project using the composer (open source or magento commerce)

Create / Login account in the Magento marketplace and go to the access key

Create a new Composer project using the Magento Open Source or Adobe Commerce metapackage.

composer create-project --repository-url=https://repo.magento.com/ magento/project-community-edition <magento-community>

5 – Installing the docker-compose

Run this command to download the current stable release of Docker Compose:

sudo curl -L "https://github.com/docker/compose/releases/download/1.29.2/docker-compose-$(uname -s)-$(uname -m)" -o /usr/local/bin/docker-compose

Apply executable permissions to the binary:

sudo chmod +x /usr/local/bin/docker-compose

Step : 6 – Setting up the docker-compose.yml – PHP 7.4, MariaDB 10.2 , PhpMyAdmin and Elastic search

create a docker-compose-yml and copy the contents into it.

touch docker-compose.yml && nano docker-compose.yml

docker-compose.yml – replace commerce.vengalavinay.com with your domain name and replace the /root/magento-community  with your Magento source path.

version: '3'
services:
    web:
        image: webdevops/php-apache-dev:7.4
        container_name: web
        restart: always
        user: application
        environment:
          - WEB_ALIAS_DOMAIN=commerce.vengalavinay.com
          - WEB_DOCUMENT_ROOT=/app/pub
          - PHP_DATE_TIMEZONE=EST
          - PHP_DISPLAY_ERRORS=1
          - PHP_MEMORY_LIMIT=2048M
          - PHP_MAX_EXECUTION_TIME=300
          - PHP_POST_MAX_SIZE=500M
          - PHP_UPLOAD_MAX_FILESIZE=1024M
        volumes:
          - /root/magento-community:/app:cached
        ports:
          - "80:80"
          - "443:443"
          - "32823:22"
        links:
          - mysql
    mysql:
        image: mariadb:10.2
        container_name: mysql
        restart: always
        ports:
          - "3306:3306"
        environment:
          - MYSQL_ROOT_PASSWORD=root
          - MYSQL_DATABASE=magento
        volumes:
          - magento-db-data:/var/lib/mysql
    phpmyadmin:
        container_name: phpmyadmin
        restart: always
        image: phpmyadmin/phpmyadmin:latest
        environment:
          - MYSQL_ROOT_PASSWORD=root
          - PMA_USER=root
          - PMA_PASSWORD=root
        ports:
          - "8080:80"
        links:
          - mysql:db
        depends_on:
          - mysql
    elasticsearch:
        container_name: elasticsearch
        image: docker.elastic.co/elasticsearch/elasticsearch:7.8.1
        environment:
          - node.name=elasticsearch
          - cluster.name=es-docker-cluster
          - discovery.type=single-node
          - bootstrap.memory_lock=true
          - "ES_JAVA_OPTS=-Xms512m -Xmx512m"
        ulimits:
          memlock:
            soft: -1
            hard: -1
        volumes:
          - magento-es-data:/usr/share/elasticsearch/data
        ports:
          - 9200:9200
volumes:
    magento-db-data:
        external: false
    magento-es-data:
        external: false

Step : 7 – Running the docker build

Run the below command to build the docker containers.

docker-compose up -d --build

access the web container by using the below command

docker exec -it web bash

Step : 8 – Magento Installation Setup using the Command line

After acess the web container. run the below command in the web container. Change the basic details(firstname, lastname, email, user, and password) and finally change the domain name.

php app/bin/magento setup:install \
--admin-firstname=Vinay \
--admin-lastname=Vengala \
[email protected] \
--admin-user=vinay \
--admin-password='VinayVengala@6668' \
--base-url=https://community.vengalavinay.com \
--base-url-secure=https://community.vengalavinay.com \
--backend-frontname=admin \
--db-host=mysql \
--db-name=magento \
--db-user=root \
--db-password=root \
--use-rewrites=1 \
--language=en_US \
--currency=USD \
--timezone=America/New_York \
--use-secure-admin=1 \
--admin-use-security-key=1 \
--session-save=files \
--use-sample-data \
--elasticsearch-host=elasticsearch

if you see the below error when you are installing the magento.

Class Magento\Framework\App\ResourceConnection\Proxy does not exist

exit from the docker web container and change the permission to the folder

chmod 777 -R <magento-community/>

 

After successful installation.

Point the IP address to the domain. using A record in DNS settings.

 

Reader Interactions

Leave a Reply Cancel reply

You must be logged in to post a comment.

Primary Sidebar

A little about the Author

Having 12+ Years of Experience in Software Development, Vinay is a principal software architect, senior systems engineer, and elite technical consultant. He specializes in bespoke PHP/WordPress development, high-performance Magento 2 & Shopify architectures, custom plugin/theme development from scratch, and legacy code modernization (including VB6, VB.NET, PyQt, and Crystal Reports). Known for solving complex database bottlenecks, speed optimization (Core Web Vitals), and advanced security code auditing, Vinay engineers production-ready systems designed to scale under heavy concurrent load conditions.



Chat on WhatsApp

Recent Posts

  • Leveraging PHP 8.3’s JIT and Vector APIs for High-Performance WordPress Headless Architectures on AWS
  • Leveraging PHP 8.3 JIT and Vectorization for Microsecond-Level API Performance in Laravel Applications
  • Beyond the Basics: Advanced Caching Strategies for WordPress Headless with Laravel API and AWS Elasticache
  • Beyond the Basics: Mastering Kubernetes for High-Availability Laravel Deployments with Advanced Blue/Green Strategies
  • Unlocking Next-Gen Performance: Advanced Caching Strategies for Headless WordPress with Laravel and Redis on AWS

Categories

  • apache (1)
  • Business & Monetization (390)
  • Centos (4)
  • Comparisons & Decision Making (55)
  • Debian (2)
  • Debugging & Troubleshooting (664)
  • Desktop Applications (14)
  • DevOps (15)
  • DevOps & Cloud Scaling (962)
  • Django (1)
  • Laravel (8)
  • Migration & Architecture (192)
  • Mobile Applications (24)
  • MySQL (1)
  • Performance & Optimization (873)
  • Performance & Security Optimization (2)
  • PHP (35)
  • PHP Development (49)
  • Plugins & Themes (244)
  • Programming Languages (10)
  • Python (20)
  • Ruby on Rails (1)
  • Security & Compliance (650)
  • SEO & Growth (492)
  • Server (118)
  • Softwares (1)
  • Ubuntu (9)
  • Uncategorized (52)
  • VB6 & VB.NET (8)
  • Web Applications & Frontend (19)
  • Web Assembly (Wasm) (2)
  • WordPress (30)
  • WordPress Plugin Development (728)
  • WordPress Theme Development (357)

Recent Posts

  • Leveraging PHP 8.3's JIT and Vector APIs for High-Performance WordPress Headless Architectures on AWS
  • Leveraging PHP 8.3 JIT and Vectorization for Microsecond-Level API Performance in Laravel Applications
  • Beyond the Basics: Advanced Caching Strategies for WordPress Headless with Laravel API and AWS Elasticache

Top Categories

  • DevOps & Cloud Scaling (962)
  • Performance & Optimization (873)
  • WordPress Plugin Development (728)
  • Debugging & Troubleshooting (664)
  • Security & Compliance (650)
  • SEO & Growth (492)

Our Products

  • ERP & LMS Systems (4)
  • Directories & Marketplaces (4)
  • Healthcare Portals (3)
  • Point of Sale (POS) (2)
  • E-Commerce Engines (2)

Our Services

  • E-Commerce Development (10)
  • WordPress Development (8)
  • Python & Desktop GUI (7)
  • General Consulting (7)
  • Legacy Modernization (5)
  • Mobile App Development (4)

Copyright © 2026 · Vinay Vengala