Skip to content

Commit 4c7b1d3

Browse files
authored
Update DOCKER.md
1 parent 830db0f commit 4c7b1d3

File tree

1 file changed

+17
-27
lines changed

1 file changed

+17
-27
lines changed

docs/DOCKER.md

Lines changed: 17 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -12,33 +12,28 @@ Below is the guide especially for `Windows 10` as the `macOS` one is very easy a
1212

1313
1) In order to use Docker, disable `Hyper-v` on `Windows 10`:
1414

15-
```shell
16-
bcdedit /set hypervisorlaunchtype off
17-
```
15+
`bcdedit /set hypervisorlaunchtype off`
1816

19-
In case you want to re-enable it after practice, here is the command:
17+
In case you want to re-enable it after practice, here is the command:
2018

21-
```shell
22-
bcdedit /set hypervisorlaunchtype auto
23-
```
19+
`bcdedit /set hypervisorlaunchtype auto`
2420

2521
2) Make sure the `Virtualization` is enabled on `Windows`. You can read [this](https://docs.docker.com/toolbox/toolbox_install_windows/) for reference.
2622

2723
3) After installing the Docker Toolbox, click the `Quick Start Terminal` on the desktop. If you have passed previous 2 steps, you will see a page for downloading one `boot2docker.iso` file. You can manually download and put it into `C:\Users\your_username\.docker\machine\cache` folder. (Copy the `boot2docker.iso` from the USB provided on the class)
2824

2925
4) You can close the `Quick Start Terminal` window, then use `cmd` (refer to `Build Docker image` section on this page). Run a command:
3026

31-
```shell
32-
docker-machine ls
33-
```
27+
`docker-machine ls`
28+
3429

3530
Then you should be able to see the default virtual machine.
3631

3732
5) Run `docker-machine env default`. It will show some information about your environment. Choose the last row and run it manually. Then you will be able to run Docker in your `cmd` window.
3833

3934
![Docker](https://user-images.githubusercontent.com/1511528/28406219-2e20f0c6-6d62-11e7-8282-673a1947f36d.png)
4035

41-
6) Remember the `IP address` in 2nd line as on `Windows`, you will use it to access the application you're deploying on Docker.
36+
6) Remember the `IP address` in 2nd line as on `Windows`, you will use it to access the application you're deploying on Docker.
4237

4338
You cannot just use localhost to access the service. Use the IP instead. The reason is there is a boot2docker VM running by VMBox. Docker connect with the VM directly. The IP is for the VM.
4439

@@ -203,7 +198,7 @@ You cannot just use localhost to access the service. Use the IP instead. The rea
203198

204199
###### Update `/Chatbot/docker/Dockerfile` with your Blockchain service URL - replace `your_block_chain_service` to actual one (refer to Blockchain practice)
205200

206-
ENV APPLICATION_API_URL https://your_block_chain_service.mybluemix.net/api/order/newinfo
201+
ENV APPLICATION_API_URL https://your_block_chain_service.mybluemix.net/api/order/newinfo
207202

208203
Now you're ready for building the Docker image.
209204

@@ -222,42 +217,37 @@ Now you're ready for building the Docker image.
222217
<img width="730" alt="Command" src="https://user-images.githubusercontent.com/1511528/28262556-f55a4fec-6b15-11e7-93b2-2d81ee7cd3d3.png">
223218
<img width="730" alt="Command" src="https://user-images.githubusercontent.com/1511528/28262716-9c734888-6b16-11e7-831b-8c6d870d0a22.png">
224219

225-
- Find your project folder, e.g. `/path/to/Chatbot/docker`, then run the command
220+
- Find your project folder, e.g. `/path/to/Chatbot/docker`, then run the command:
226221

227-
```shell
228-
cd /path/to/Chatbot/docker
229-
```
222+
`cd /path/to/Chatbot/docker`
230223

231224
- To build the Docker image, run the command:
232225

233-
```shell
234-
docker build -t chatbot -f Dockerfile ./
235-
```
226+
`docker build -t chatbot -f Dockerfile ./`
236227

237228
### Run the Docker image on a new container
238229

239230
- Run the command:
240231

241-
```shell
242-
docker run -d -p 8888:9080 chatbot
243-
```
232+
`docker run -d -p 8888:9080 chatbot`
233+
244234

245235
##### Now you can visit your Chatbot web application via
246236

247237
- macOS: [http://localhost:8888/Chatbot](http://localhost:8888/Chatbot)
248238
- Windows: Refer to section `Install docker on Windows 10 (5, 6)`, so the format of the URL would be like `http://xxx.xxx.x.x:8888/Chatbot`
249239

250240
### Possible issues
251-
If you encounter an issue like the output from `Terminal` or `cmd` as below
241+
- If you encounter an issue like the output from `Terminal` or `cmd` as below
252242

243+
```
253244
Sending build context to Docker daemon 4.246MB
254245
Step 1/15 : FROM websphere-liberty:webProfile7
255246

256247
Get https://registry-1.docker.io/v2/library/websphere-liberty/manifests/webProfile7: unauthorized: incorrect username or password
248+
```
257249

258-
Please run this command:
250+
- Please run this command:
259251

260-
```shell
261-
docker logout
262-
```
252+
`docker logout`
263253

0 commit comments

Comments
 (0)