-
Notifications
You must be signed in to change notification settings - Fork 8
MacOS and Docker Desktop support
System requirements for Linux and MacOS are the same in terms of PHP version, extensions and Docker version. Installation process is also the same except for the 4th step. Instead of this command:
php "${DOCKERIZER_PROJECTS_ROOT_DIR}dockerizer_for_php/bin/dockerizer" composition:build-from-template \
--template=traefik --required-services=traefik_host_network
Run this one:
php "${DOCKERIZER_PROJECTS_ROOT_DIR}dockerizer_for_php/bin/dockerizer" composition:build-from-template \
--template=traefik --required-services=traefik_bridge_network
This will create a Docker composition with Traefik that will work on MacOS and Docker Desktop:
- It will use the
bridge
Docker network mode instead ofhost
mode. - It will bind ports
80
and443
to the host machine.
This is required because Docker Desktop does not support host
network mode due to running Linux virtual machine
instead of using the host OS kernel.
You can still use all the same Bash aliases for ZSH.
Since we use the bridge
network mode on MacOS and Docker Desktop, the network traffic is routed differently than on Linux.
There are two ways to access your applications:
- Easy but dirty: connect all compositions to the
traefik_bridge_network
network. Unfortunately, in this case all containers will be able to access each other. This is highly not recommended because isolation is what developers should care about. - Recommended: connect Traefik container to all other compositions. This way it will be able to access all applications and route traffic to them. At the same time, other containers will not be able to access each other.
Manually connecting and disconnecting Traefik container to/from other compositions is not convenient. This is why we
recommend to use the maintenance:traefik:update-networks
command to automate this process. Run it once to connect/disconnect Traefik container to/from all other compositions
or use it with the --watch
option to automatically connect/disconnect Traefik container to/from new compositions.
See the command description for more information.
There are a few services that are not available on MacOS with M1 and later processors:
-
mysql_5_6_persistent
andmysql_5_7_persistent
-
elasticsearch_7_6_2_persistent
andelasticsearch_7_7_1_persistent
Ensure to enable Rozetta emulation in Docker Desktop settings to run these services. Dockerizer will automatically
pull linux/amd64
images for these services if Docker arch is arm64
and image does not support it.
- docker:mysql:connect
- docker:mysql:export-db
- docker:mysql:import-db
- docker:mysql:upload-to-aws
- docker:mysql:generate-metadata
- docker:mysql:reconstruct-db
- docker:mysql:test-metadata
- magento:setup
- magento:reinstall
- magento:test-module-install
- magento:test-templates
- magento:test-dockerfiles
- MacOS and Docker Desktop support
- Bash aliases
- Install Symfony with Dockerizer
- Running-apps-with-existing-Docker-compositions
- Limitations
- Building MySQL images with DB: how it works
- Configure AWS Lambda
- Gitlab pipeline to build images
- Managing AWS S3 access
- Using AWS credentials with Dockerizer
- Access management cheat-sheet
- FAQ