GithubHelp home page GithubHelp logo

leonmex / docker-magento2 Goto Github PK

View Code? Open in Web Editor NEW
0.0 2.0 0.0 113.54 MB

Docker machine + container for run magento 2

Shell 0.01% PHP 76.40% JavaScript 8.79% HTML 10.36% CSS 4.40% VCL 0.01% XSLT 0.02%

docker-magento2's Introduction

Magento 2 Docker

You have to install docker on your machine. If you are running Mac OS it is assumed you use Docker for Mac.

Preconfiguration

There is a build.default.properties file which holds a lot of configurations. There are some general settings:

  • magento.version: Select the magento version being installed
  • use.sample.data: If true the sample data will be installed

There are further settings for the Magento 2 instance which you can set to your wishes. If you want to change the base url you also have to change the nginx configuration in conf/nginx/conf.d/vhost-default.conf.

Setup

## set up docker instance and install magento in developer mode
ant build

## enter the ip address of the dev machine into your hosts file
echo "127.0.0.1 magento2.docker" | sudo tee -a /etc/hosts

Develop Magento modules

Checkout your modules into src directory e.g. git clone [email protected]:group/module-name.git src. Next open the gulpfile.js and edit app/code/Vendor/MyModule/ of options array to your module name.

Install all necessary tools via npm: npm install.

There is a watcher built with gulp. Just enter gulp and it watches the src directory for changes and copies them to the docker instance.

Useful development commands

  • gulp Starts the watcher on the src directory
  • ant copy-www-to-docker Copies the www directory to the docker container
  • ant copy-www-to-local Copies the www directory from the docker container to your local machine
  • bin/mr2 Runs magerun 2 inside the docker container
  • docker exec -ti magento2_instance sh Get console of docker container

docker-magento2's People

Watchers

James Cloos avatar Noel Barrera avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.