You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Feb 13, 2023. It is now read-only.
Copy file name to clipboardExpand all lines: docs/other/docker.md
+17-10
Original file line number
Diff line number
Diff line change
@@ -4,11 +4,27 @@ Drupal VM includes a few `composer` scripts and an example `docker-compose.yml`
4
4
5
5
> **Docker support is currently experimental**, so you may want to wait until Docker support is more finalized unless you're already familiar with Docker, and okay with potentially backwards-incompatible changes when upgrading Drupal VM.
6
6
7
+
## Managing your hosts file
8
+
9
+
Before using Docker to run Drupal VM, you should [edit your hosts file](https://support.rackspace.com/how-to/modify-your-hosts-file/) and add the following line:
10
+
11
+
192.168.88.88 drupalvm.dev
12
+
13
+
...but substituting the IP address and domain name you'd like to use to access your Drupal VM container.
14
+
15
+
> If you're using Docker for Mac, you need to perform one additional step to ensure you can access Drupal VM using a unique IP address:
16
+
>
17
+
> 1. Add an alias IP address on the loopback interface: `sudo ifconfig lo0 alias 192.168.88.88/24`
18
+
>
19
+
> Note that you'll have to create the alias again after restarting your computer. See [this Docker (moby) issue](https://github.com/moby/moby/issues/22753#issuecomment-246054946) for more details.
20
+
7
21
## Building ('baking') a Docker container with Drupal VM
8
22
9
23
After you've configured your Drupal VM settings in `config.yml` and other configuration files, run the following command to create and provision a new Docker container:
10
24
11
-
composer docker-bake
25
+
[OPTIONS] composer docker-bake
26
+
27
+
Look at the variables defined in the `provisioning/docker/bake.sh` file for all the currently-available options (e.g. `DRUPALVM_IP_ADDRESS`, `DISTRO`, etc.). You can use Drupal VM's defaults by running the `composer docker-bake` command without any options.
12
28
13
29
This process can take some time (it should take a similar amount of time as it takes to build Drupal VM normally, using Vagrant and VirtualBox), and at the end, you should see a message like:
14
30
@@ -51,12 +67,3 @@ Drupal VM includes an `example.docker-compose.yml` file. To use the file, copy i
51
67
docker-compose up -d
52
68
53
69
(The `-d` tells `docker-compose` to start the containers and run in the background.) You can stop the containers with `docker-compose stop`, or remove all their configuration with `docker-compose down`.
54
-
55
-
> If you're using Docker for Mac, you need to perform two manual steps prior to running `docker-compose up` to ensure you can access Drupal VM using a unique IP address:
56
-
>
57
-
> 1. Run `sudo nano /etc/hosts` and add a line for Drupal VM in Docker (e.g. `192.168.88.88 drupalvm.dev` using the defaults).
58
-
> 2. Add an alias IP address on the loopback interface: `sudo ifconfig lo0 alias 192.168.88.88/24`
59
-
>
60
-
> Note that you'll have to create the alias again after restarting your computer. And if you don't know what any of this means, you might want to hold off on running Drupal VM inside Docker for now :)
61
-
>
62
-
> See [this Docker (moby) issue](https://github.com/moby/moby/issues/22753#issuecomment-246054946) for more details.
0 commit comments