Additional Software For Web Server Environment

Installation of additional programs facilitating the development process

SoftwareVersion
Docker26.0
Visual Studio Code1.87

 

Docker

Why Docker?
As well as using the native installation path to set up a system with all the requirements to run Magento Open Source, you can also use Docker, either with a custom project or using an existing solution. It is generally easier to set up a Docker-based development environment than a native one.
Developing with Docker: Developing apps today requires so much more than writing code. Multiple languages, frameworks, architectures, and discontinuous interfaces between tools for each lifecycle stage creates enormous complexity. Docker simplifies and accelerates your workflow, while giving developers the freedom to innovate with their choice of tools, application stacks, and deployment environments for each project.
Version: 26.0

Official info: https://www.docker.com/
Documentation: https://docs.docker.com/

  1. How to install Docker Engine on Debian
  2. How to install Docker Compose on Debian

 

How to install Docker Engine on Debian:

Official info: https://docs.docker.com/engine/install/debian/

Install using the apt repository

STEP 1: Set up Docker's apt repository

Add Docker's official GPG key:

sudo apt-get update
sudo apt-get install ca-certificates curl
sudo install -m 0755 -d /etc/apt/keyrings
sudo curl -fsSL https://download.docker.com/linux/debian/gpg -o /etc/apt/keyrings/docker.asc
sudo chmod a+r /etc/apt/keyrings/docker.asc

Add the repository to Apt sources:

echo \
"deb [arch=$(dpkg --print-architecture) signed-by=/etc/apt/keyrings/docker.asc] https://download.docker.com/linux/debian \
  $(. /etc/os-release && echo "$VERSION_CODENAME") stable" | \
  sudo tee /etc/apt/sources.list.d/docker.list > /dev/null
  sudo apt-get update

STEP 2: Install the Docker packages (latest):

sudo apt-get install docker-ce docker-ce-cli containerd.io docker-buildx-plugin docker-compose-plugin

Verify that the installation is successful by running the hello-world image:

sudo docker run hello-world

This command downloads a test image and runs it in a container. When the container runs, it prints a confirmation message and exits. You have now successfully installed and started Docker Engine.

 

Linux post-installation steps for Docker Engine

Official info: https://docs.docker.com/engine/install/linux-postinstall/

Manage Docker as a non-root user

1) Create the docker group:

sudo groupadd docker

2) Add your user to the docker group:

sudo usermod -aG docker $USER

3) Log out and log back in so that your group membership is re-evaluated. If you're running Linux in a virtual machine, it may be necessary to restart the virtual machine for changes to take effect.

You can also run the following command to activate the changes to groups:

newgrp docker

4) Verify that you can run docker commands without sudo:

docker run hello-world

Configure Docker to start on boot with systemd

To automatically start Docker and containerd on boot for other Linux distributions using systemd, run the following commands:

sudo systemctl enable docker.service
sudo systemctl enable containerd.service

To stop this behavior, use disable instead.

sudo systemctl disable docker.service
sudo systemctl disable containerd.service

Set permissions to the Docker daemon socket

To prevent error: Got permission denied while trying to connect to the Docker daemon socket at set permissions:

sudo chmod 666 /var/run/docker.sock

Next step: Use Docker to set up a system with all the requirements to run Magento Open Source


(Separate installation: Install Docker Compose)

------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

 

How to install Docker Compose on Debian (individually):

Official info: https://docs.docker.com/compose/install/

Installation scenario: Install the Compose plugin

If you already have Docker Engine and Docker CLI installed, you can install the Compose plugin from the command line, by Using Docker's repository.

Update the package index, and install the latest version of Docker Compose:

sudo apt-get update
sudo apt-get install docker-compose-plugin

Verify that Docker Compose is installed correctly by checking the version:

docker compose version

Expected output:

Docker Compose version vN.N.N

Where vN.N.N is placeholder text standing in for the latest version.

Next step: Set up Web Server environment


 

Visual Studio Code

Why VS Code?
Code editing. Free and built on open source. Integrated Git, debugging and extensions. Runs everywhere
Version: 1.87

Official info: https://code.visualstudio.com/
Docs: https://code.visualstudio.com/docs

  1. How to install Visual Studio Code 1.87 on Debian/Ubuntu

 

How to install VS Code 1.87 on Debian/Ubuntu:

Official info: https://code.visualstudio.com/docs/setup/linux

The easiest way to install Visual Studio Code for Debian/Ubuntu based distributions is to download and install the .deb package, either through the graphical software center if it's available, or through the command line with:

sudo apt install ./<file>.deb

Replace <file> with the appropriate file name

Then update the package cache and install the package using:

sudo apt install apt-transport-https
sudo apt update
sudo apt install code

Once you have installed VS Code, these topics will help you learn more about it:

  1. Additional Components - Learn how to install Git, Node.js, TypeScript, and tools like Yeoman:
    https://code.visualstudio.com/docs/setup/additional-components
  2. User Interface - A quick orientation to VS Code:
    https://code.visualstudio.com/docs/getstarted/userinterface
  3. User/Workspace Settings - Learn how to configure VS Code to your preferences through settings:
    https://code.visualstudio.com/docs/getstarted/settings

Next step: Set up Web Server environment


 


 

 

 

 

...It is working!

Next step: Setting Up Virtual Hosts

 


 


ONLINE GUIDE for Magento 2 Course "Practical advice about customization of a store" | https://udemy.com/course/magento-2-practical-advice-about-customization-of-a-store/