Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

typo #1

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
37 changes: 26 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -365,8 +365,8 @@ Let's start by clining the repos and packaging our Java application with Maven:

### Clone The Repositories
```
git clone github.com/mohaghighi/covid19-web-application
git clone github.com/mohaghighi/covid19-UI
git clone github.com/rapchic/Covid19-Web-Application
git clone github.com/rapchic/Covid19-UI
```
### Package Spring Boot with Maven

Expand Down Expand Up @@ -411,8 +411,6 @@ containers using simple commands and work-saving automation.
So let's get started and build our first container image with Docker.
> The first step is to craft our dockerfile and the Dockerfile is essentially the build instructions to build the image.



![alt text](https://github.com/mohaghighi/Covid19-Web-Application/raw/master/images/Labs/Slide36.png)
#### What is a Dockerfile?
A set of build instructions to build the image in a file called "dockerfile".
Expand Down Expand Up @@ -525,7 +523,7 @@ docker build -t myui:v1 .
```
> in case you haven't run the maven build and packaged the UI App, run this where mvnm file is located
```
./mvnm clean install
./mvnw clean install
```
Now let's run the UI app on port 8081:
```
Expand Down Expand Up @@ -570,22 +568,39 @@ As you can see our UI and Parser apps are not part of the same network.
![alt text](https://github.com/mohaghighi/Covid19-Web-Application/raw/master/images/Labs/Slide48.png)

Let's create a network and instruct our containers to connect to it
```docker network create test

```
docker network create test
```

let's stop our docker containers:
```docker stop [container id]

```
docker stop [container id]
```

Let's run our containers again, this time instructing them to join the new network we've just created
```docker run -p [PortHost:PortContainer] [imageName] --net=test

```
docker run -p [PortHost:PortContainer] [imageName] --net=test
```

Run UI application on test network:
```docker run -p 8081:8081 myui:v1 --net=test

```
docker run -p 8081:8081 myui:v1 --net=test
```

Run parser application on test network:
```docker run -p 8082:8082 myapp:v1 --net=test

```
docker run -p 8082:8082 myapp:v1 --net=test
```

Let's inspect our containers again and get their IP addresses based on thier new network
```docker inspect [container name/ID]

```
docker inspect [container name/ID]
```

if we try to ping our applications again, they should work fine.
Expand Down