@@ -63,12 +63,13 @@ ready to get up and going with DevBox.
63
63
64
64
* Install a recent version of Docker from http://docker.com/ . Docker is
65
65
available for Windows, Mac, and Linux.
66
- * As part of the Docker installation process, on Windows 10 you may need to
66
+ * As part of the Docker installation process on Windows 10, you may need to
67
67
turn on Hyper-V and then grant Docker access to the ` C: ` drive for Docker to
68
68
mount volumes correctly. This is described in the Docker documentation.
69
69
* On Windows, it can be useful to install "Git Bash"
70
- (https://git-for-windows.github.io/ ). As well as Git, it includes a terminal
71
- emulator as well as a useful collection of Linux commands.
70
+ (https://git-for-windows.github.io/ ). As well as Git, it includes SSH, an
71
+ xterm terminal emulator, and a useful collection of commonly used Linux
72
+ commands.
72
73
73
74
## Setting Up a New Environment
74
75
@@ -133,13 +134,26 @@ You can check what containers exist using
133
134
134
135
To get a bash prompt inside the web container, use
135
136
136
- docker-compose exec web bash
137
+ docker-compose exec --user magento2 web bash
137
138
138
139
You should see a shell prompt of ` m2$ ` . If you are using a Git Bash window on
139
140
Windows, you may see an error message saying you need to use ` winpty ` . In that
140
141
case you must use the following command to create a bash prompt.
141
142
142
- winpty docker-compose exec web bash
143
+ winpty docker-compose exec --user magento2 web bash
144
+
145
+ In general this works well, but on Windows the 'exec' command will exit if you
146
+ press CTRL+Z. If you like using CTRL+Z in Linux, this is rather annoying, so
147
+ SSH access is recommended instead.
148
+
149
+ To enable SSH support (recommended), make sure port 22 is uncommented in
150
+ ` docker-compose.yml ` and mapped to an available port number. For example, use
151
+ "2222:22" to use port 2222 to avoid colliding with any local SSH daemons.
152
+ You must then use the ` -p 2222 ` argument to specify the port number. The
153
+ ` m2ssh ` command (BAT and bash versions available) automatically picks up the
154
+ port number from your ` docker-compose.yml ` file.
155
+
156
+ m2ssh
143
157
144
158
### 4. Install Magento
145
159
@@ -167,7 +181,7 @@ will copy files on your laptop into the web container when Unison is started.
167
181
168
182
Log into the web container.
169
183
170
- docker-compose exec web bash
184
+ m2ssh
171
185
172
186
Create a new project under ` /var/www/magento2 ` . Update the project edition and
173
187
version number as appropriate. This example uses Magento Open Source (formerly
@@ -187,7 +201,7 @@ repository on a hosting provider such as GitHub or BitBucket.
187
201
188
202
Log into the web container:
189
203
190
- docker-compose exec web bash
204
+ m2ssh
191
205
192
206
Check out the project from inside the container into the ` magento2 ` directory.
193
207
@@ -213,7 +227,7 @@ developers.)
213
227
214
228
Log into the web container:
215
229
216
- docker-compose exec web bash
230
+ m2ssh
217
231
218
232
Make a local clone of Magento Open Source (formerly Community Edition). Use
219
233
your own fork repository URL if appropriate.
@@ -240,7 +254,7 @@ to use. The following creates the database `magento2`.
240
254
241
255
Log on to the bash prompt inside the web container
242
256
243
- docker-compose exec web bash
257
+ m2ssh
244
258
245
259
Run the following commands to create a MyQL database for the web site to use
246
260
(plus a second database for integration tests to use).
@@ -313,13 +327,13 @@ using the START command or by double clicking the BAT file via Windows file
313
327
explorer. This will automatically retrieve a copy of the ` unison.exe ` binary
314
328
from the web container. Close the window to kill Unison.
315
329
316
- START m2devbox-unison-sync .bat
330
+ START m2unison .bat
317
331
318
332
Mac binaries and a shell script are also provided. It is recommended to run the
319
333
sync shell script in a separate Terminal window so you can refer to its output
320
334
if you ever need to do troubleshooting.
321
335
322
- ./m2devbox-unison-sync.sh
336
+ ./m2unison
323
337
324
338
This shell script cannot be used on Linux, only Mac OSX. Use volume mounting on
325
339
Linux (not Unison).
0 commit comments