forked frompunitmittal30/magento-docker-setup-mac-os-m1
- Notifications
You must be signed in to change notification settings - Fork0
mappiecoder/magento-docker-setup-mac-os-m1
Folders and files
| Name | Name | Last commit message | Last commit date | |
|---|---|---|---|---|
Repository files navigation
To see the official README, go to the main project
This README will show you how to install a new project or use existing projects on macs with M1
This setup assumes you are running Docker on a computer with at least 4GB of allocated RAM, a dual-core, and an SSD hard drive. Download & Install Docker Desktop.
This configuration has been tested on Mac with M1.
Same result as the one-liner above. Just replacemagento2.test references with the hostname that you wish to use.
# Download the Docker Compose template:curl -s https://raw.githubusercontent.com/luancschmitz/docker-magento/master/lib/template| bash# Build the imagesdocker-compose build# Download the version of Magento you want to use with:bin/download 2.4.1# If the download fails, the script will attempt to download Magento with Composer# or if you'd rather install with Composer, run:## OPEN SOURCE:## rm -rf src# composer create-project --repository=https://repo.magento.com/ --ignore-platform-reqs --prefer-dist magento/project-community-edition=2.4.1 src## COMMERCE:## rm -rf src# composer create-project --repository=https://repo.magento.com/ --ignore-platform-reqs --prefer-dist magento/project-enterprise-edition=2.4.1 src# Create a DNS host entry for the site:echo"127.0.0.1 ::1 magento2.test"| sudo tee -a /etc/hosts# Run the setup installer for Magento:bin/setup magento2.testopen https://magento2.test
# Download the Docker Compose template:curl -s https://raw.githubusercontent.com/luancschmitz/docker-magento/master/lib/template| bash#Build the Imagesdocker-compose build# Replace with existing source code of your existing Magento instance:cp -R~/Sites/existing src# or: git clone git@github.com:myrepo.git src# Create a DNS host entry for the site:echo"127.0.0.1 ::1 yoursite.test"| sudo tee -a /etc/hosts# Start some containers, copy files to them and then restart the containers:docker-compose up -drm -rf src/vendorbin/copytocontainer --all## Initial copy will take a few minutes...# Install composer dependencies, then copy artifacts back to the host (for debugging purposes):bin/composer installbin/copyfromcontainer vendor# Import existing database:bin/mysql< backups/magento.sql# Update database connection details to use the above Docker MySQL credentials:# Also note: creds for the MySQL server are defined at startup from env/db.env# vi src/app/etc/env.php# Import app-specific environment settings:bin/magento app:config:import# Set base URLs to local environment URL (if not defined in env.php file):bin/magento config:set web/secure/base_url https://yoursite.test/bin/magento config:set web/unsecure/base_url https://yoursite.test/bin/restartopen https://magento2.test
For more details on how everything works, see the extendedsetup readme.
bin/bash: Drop into the bash prompt of your Docker container. Thephpfpmcontainer should be mainly used to access the filesystem within Docker.bin/cache-clean: Access thecache-clean CLI. Note the watcher is automatically started at startup inbin/start. Ex.bin/cache-clean config full_pagebin/cli: Run any CLI command without going into the bash prompt. Ex.bin/cli lsbin/clinotty: Run any CLI command with no TTY. Ex.bin/clinotty chmod u+x bin/magentobin/cliq: The same asbin/cli, but pipes all output to/dev/null. Useful for a quiet CLI, or implementing long-running processes.bin/composer: Run the composer binary. Ex.bin/composer installbin/copyfromcontainer: Copy folders or files from container to host. Ex.bin/copyfromcontainer vendorbin/copytocontainer: Copy folders or files from host to container. Ex.bin/copytocontainer --allbin/dev-urn-catalog-generate: Generate URN's for PHPStorm and remap paths to local host. Restart PHPStorm after running this command.bin/devconsole: Alias forbin/n98-magerun2 dev:consolebin/devtools-cli-check: Check & install the CLI devtools if missing from system.bin/download: Download & extract specific Magento version to thesrcdirectory. If the archive download fails, it will attempt to download with Composer. Ex.bin/download 2.4.1bin/fixowns: This will fix filesystem ownerships within the container.bin/fixperms: This will fix filesystem permissions within the container.bin/grunt: Run the grunt binary. Ex.bin/grunt execbin/magento: Run the Magento CLI. Ex:bin/magento cache:flushbin/mysql: Run the MySQL CLI with database config fromenv/db.env. Ex.bin/mysql -e "EXPLAIN core_config_data"orbin/mysql < backups/magento.sqlbin/mysqldump: Backup the Magento database. Ex.bin/mysqldump > backups/magento.sqlbin/n98-magerun2: Access then98-magerun2 CLI. Ex:bin/n98-magerun2 dev:consolebin/node: Run the node binary. Ex.bin/node --versionbin/npm: Run the npm binary. Ex.bin/npm installbin/pwa-studio: (BETA) Start the PWA Studio server. Note that Chrome will throw SSL cert errors and not allow you to view the site, but Firefox will.bin/redis: Run a command from the redis container. Ex.bin/redis redis-cli monitorbin/remove: Remove all containers.bin/removeall: Remove all containers, networks, volumes, and images.bin/removevolumes: Remove all volumes.bin/restart: Stop and then start all containers.bin/root: Run any CLI command as root without going into the bash prompt. Exbin/root apt-get install nanobin/rootnotty: Run any CLI command as root with no TTY. Exbin/rootnotty chown -R app:app /var/www/htmlbin/setup: Run the Magento setup process to install Magento from the source code, with optional domain name. Defaults tomagento2.test. Ex.bin/setup magento2.testbin/setup-grunt: Install and configure Grunt JavaScript task runner to compile .less filesbin/setup-pwa-studio: (BETA) Install PWA Studio (requires NodeJS and Yarn to be installed on the host machine). Pass in your base site domain, otherwise the defaultmaster-7rqtwti-mfwmkrjfqvbjk.us-4.magentosite.cloudwill be used. Ex:bin/setup-pwa-studio magento2.testbin/setup-ssl: Generate an SSL certificate for one or more domains. Ex.bin/setup-ssl magento2.test magento3.testbin/setup-ssl-ca: Generate a certificate authority and copy it to the host.bin/start: Start all containers, good practice to use this instead ofdocker-compose up -d, as it may contain additional helpers.bin/status: Check the container status.bin/stop: Stop all containers.bin/update: Update your project to the most recent version ofdocker-magento.bin/xdebug: Disable or enable Xdebug. Accepts paramsdisable(default) orenable. Ex.bin/xdebug enable
About
Magento Docker Setup for Macbook having M1 Chip
Resources
Uh oh!
There was an error while loading.Please reload this page.
Stars
Watchers
Forks
Releases
No releases published
Packages0
No packages published
Languages
- Shell82.4%
- Dockerfile17.6%