Sign inSign up

angelomaragna/magento2

By angelomaragna

•Updated over 7 years ago

alpine machine with nginx, php, varnish

Image
1

793

angelomaragna/magento2 repository overview

[Last update 23/12/2018]

(This is stil a work in progress - the following description is not up to date)

⁠Goal

alpine machine compliant with magento 2 requirements on http://devdocs.magento.com/guides/v2.3/install-gde/system-requirements-tech.html⁠

⁠Instructions

  1. Activate a local mysql
docker run -it --name m2-mysql --rm mysql:5.7 -p 3306:3306 sh -c 'exec mysql -h"$MYSQL_PORT_3306_TCP_ADDR" -P"$MYSQL_PORT_3306_TCP_PORT" -uroot -p"$MYSQL_ENV_MYSQL_ROOT_PASSWORD"'
  1. Activate redis
docker run --name m2-redis -p 6379:6379 -d redis
  1. Start the instance
docker run --name m2stead --link m2-redis:redis --link m2-mysql:mysql -p 80:80 -p 443:443 -v ${CURRENT_DIR}/website:/var/www/default -ti m2stead /bin/sh
  1. Run this command inside the machine to start nginx
start-nginx-as-a-daemon.sh

Options explained: -p 80:80 -p 443:443 > bind the hostPort:containerPort --name training > use simple container naming --add-host docker-host:192.168.1.102 > map a virtual host in the /etc/hosts file of the container -v ~/projects/training/magento2:/var/www/mage.dev > map a your local host directory containing your website files to the container mage.dev directory

Access the page at https://m2stead.local⁠

⁠Notes

Tag summary

Content type

Image

Digest

Size

75.2 MB

Last updated

over 7 years ago

docker pull angelomaragna/magento2