Download the PHP package dominicwatts/docker-magento2 without Composer

On this page you can find all versions of the php package dominicwatts/docker-magento2. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package docker-magento2

Magento 2 Docker

A collection of Docker images for running Magento 2 through nginx and on the command line.

Quick Start

quickstart.sh covers steps 3 through to 8 with default config

1 Install

composer create-project dominicwatts/docker-magento2 ./

Or

git clone [email protected]:DominicWatts/docker-magento2.git ./

2 Add the following entry to OS hosts file

127.0.0.1 magento2.docker

3 Put the correct tokens into composer.env

cp composer.env.sample composer.env

Edit composer.env with correct environment variables

4 Put the correct tokens into auth.json

cp composer/auth.sample.json composer/auth.json

5 Put the correct tokens into newrelic.ini

cp newrelic/newrelic.sample.ini newrelic/newrelic.ini

6 Create magento folder

mkdir magento

7 Create cron log file

touch magento/var/log/cron.log    

8 Build

docker-compose up -d

Or using specific config, for example:

docker-compose -f docker-compose.src.71.yml up -d

docker-compose -f docker-compose.src.72.yml run --rm cli

docker-compose -f docker-compose.src.73.yml run --rm cli magento-command

9 Install

9. 1 Install Manually

Manually
Hypernode
wget -qO- https://magento.mirror.hypernode.com/releases/magento2-latest.tar.gz | tar xfz -

or

wget -qO- https://magento.mirror.hypernode.com/releases/magento-2.3.4.tar.gz | tar xfz -
Download

Download, unzip and install magento from https://magento.com/tech-resources/download

Magento goes inside ./magento

Then run command line install or web install

CLI
 docker-compose run --rm cli magento-command setup:install --admin-firstname Admin --admin-lastname User --admin-email [email protected] --admin-user admin --admin-password test123 --base-url http://magento2.docker/ --backend-frontname xpanel --db-host db --db-name magento2 --db-user magento2 --db-password magento2 --language en_GB --currency GBP --timezone UTC --use-rewrites 1 --session-save files
Web
http://magento2.docker/setup/

9.2 Install via wrapper

docker-compose run --rm cli magento-installer

This will attempt to install via composer if magento folder is empty (time consuming)

Useful commands

Command line (remove once exit)

docker-compose run --rm cli

Magento command via wrapper

docker-compose run --rm cli magento-command

docker-compose run --rm cli magento-command cache:clean

Install extension via wrapper

docker-compose run --rm cli magento-extension-installer --package-name=dominicwatts/clearstatic Xigen_ClearStatic

Check instances

docker ps

docker-compose ps

Restart instances

docker-compose restart

Optional configuring of mailhog

http://magento2.docker:8025

composer require mageplaza/module-smtp

Store > Configuration > Mageplaza > SMTP

Configuration

Configuration is driven through environment variables. A comprehensive list of the environment variables used can be found in each Dockerfile and the commands in each bin/ directory.

A series of sample docker-compose.yml files are is the repo

CLI Usage

A number of commands are baked into the image and are available on the $PATH. These are:

It's recommended that you mount an external folder to /root/.composer/cache, otherwise you'll be waiting all day for Magento to download every time the container is booted.

CLI commands can be triggered by running:

docker-compose run cli magento-installer

Shell access to a CLI container can be triggered by running:

docker-compose run cli bash

Sendmail

All images have sendmail installed for emails, however it is not enabled by default. To enable sendmail, use the following environment variable:

ENABLE_SENDMAIL=true

Note: If sendmail has been enabled, make sure the container has a hostname assigned using the hostname field in docker-compose.yml or --hostname parameter for docker run. If the container does not have a hostname set, sendmail will attempt to discover the hostname on startup, blocking for a prolonged period of time.

Implementation Notes

xdebug Usage

To enable xdebug, you will need to toggle the PHP_ENABLE_XDEBUG environment variable to true in global.env. Then when using docker-compose you will need to restart the fpm container using docker-compose up -d, or stopping and starting the container.

Creating a docker image

New Relic image

Assuming your docker hub repository is domw/magento2-php-newrelic

cd php/newrelic/7.1-fpm

docker login

docker build -t domw/magento2-php-newrelic:7.1-fpm ./

docker push domw/magento2-php-newrelic:7.1-fpm

Vanilla Image

Assuming your docker hub repository is domw/magento2-php

cd php/src/7.2-fpm

docker login

docker build -t domw/magento2-php:7.2-fpm ./

docker push domw/magento2-php:7.2-fpm

docker-compose

Then edit docker-compose.yml to load your new image

Elastic Search

ES Service

ES Monitor (Kibana)

Notes: kibana:6.x compatible with 6.x ES

ES with Magento

To configure Magento to use Elasticsearch:

Log in to the Magento Admin

Stores > Settings > Configuration > Catalog > Catalog > Catalog Search.

From the Search Engine list, select the correct Elasticsearch version 6. 

Elasticsearch Server Hostname: search

Elasticsearch Server Port: 9200

ES Debugging

http://magento2.docker:9200/

http://magento2.docker:9200/_cluster/health

http://magento2.docker:9200/_cat/nodes?v&pretty

http://magento2.docker:9200/_cat/indices?v&pretty

Note: search reindex creates magento2_product_1_vx indices

- magento2_product_1_v1
- magento2_product_1_v2

etc

New Relic

Verify daemon

ps -ef | grep newrelic-daemon

status

/etc/init.d/newrelic-daemon status

start / stop / restart

/etc/init.d/newrelic-daemon start

/etc/init.d/newrelic-daemon stop

/etc/init.d/newrelic-daemon restart

Config file

/newrelic/newrelic.ini => /usr/local/etc/php/conf.d/newrelic.ini

run install

newrelic-install install

Configure within Magento

Stores > Configuration > General > New Relic Monitoring

Deployment

This is experimental method to get docker web root up to date with git remote

cd git

git init --bare

Configure remote

ssh://[email protected]:22/path/to/remote/git

push branch to remote

Confirm post-receive hook details

/git/hooks/post-receive

Test hook

sudo chmod 777 ./magento -R

Wide open for local development only

sh git/hooks/post-receive

This triggers deploy_magento.sh with variables set in hook

If process gets stuck

rm deploy.lock

Stack Problems

MySQL cannot connect error prior to magento install

docker-compose down -v

rm mysql/data -R 

docker-compose up -d

Wait a few mins whilst db initialise

Useful Alias's


All versions of docker-magento2 with dependencies

PHP Build Version
Package Version
No informations.
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package dominicwatts/docker-magento2 contains the following files

Loading the files please wait ....