Browse Source

adding docker questions

pull/483/head
lee 5 years ago
parent
commit
32e42b3987
  1. 43
      subjects/forum/forum.audit.en.md
  2. 4
      subjects/forum/forum.en.md

43
subjects/forum/forum.audit.en.md

@ -18,6 +18,8 @@
###### Is the forum composed of services?
###### The communication between the services well stablish? Does the communication use [smart EndPoints](https://medium.com/@nathankpeck/microservice-principles-smart-endpoints-and-dumb-pipes-5691d410700f)(ex: Request-Response, Observer)?
#### SQLite
###### Does the code contain at least one CREATE query?
@ -38,6 +40,43 @@
###### Does it present the post you created?
#### Authentication
#### Docker
###### Does the project have Dockerfiles?
##### Try to run the command `"docker image build [OPTINS] PATH | URL | -"` to build the image using using the project Dockerfiles?
```
student$ docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
<name of the image> latest 85a65d66ca39 7 seconds ago 795MB
```
###### Run the command `"docker images"` to see images. Does all images build as above?
##### Try running the command `"docker container run [OPTIONS] IMAGE [COMMAND] [ARG...]"` to start the containers using the images just created.
```
student$ docker ps -a
CONTAINER ID IMAGE COMMAND CREATED STATUS PORTS NAMES
cc8f5dcf760f ascii-art-web-docker "./server" 6 seconds ago Up 6 seconds 0.0.0.0:8080->8080/tcp ascii-art-web
```
###### Run the command `"docker ps -a"` to see containers. Is the docker containers running as above?
##### Try running the comment `"docker network ls"`
```
NETWORK ID NAME DRIVER SCOPE
24560f95a216 <network-name> bridge local
24560f95a216 bridge bridge local
3f12239adb4f host host local
159cdc8d8083 none null local
```
###### Is the network a bridge driver and does it appear in the list of networks as above?
##### Try openning a shell to the running container, using the [command](https://docs.docker.com/engine/reference/commandline/exec/) `"docker exec [OPTIONS] CONTAINER COMMAND [ARG...]"` (ex: `"docker exec -it <container-name> /bin/bash"`) and ping the other container that are connected to the same network, for [example](https://docs.docker.com/engine/tutorials/networkingcontainers/).
###### Did it ping with success? Are the multiple services/containers communicating between each other?
###### Does the project present no [unused object](https://docs.docker.com/config/pruning/)?
###### Did the server behaved as expected?(did not crashed)
@ -57,6 +96,8 @@
###### +Is the database a service?
###### +Does the project present a script to build the images and containers? (using a script to simplify the build)
#### Basic
###### +Does the project runs quickly and effectively? (Favoring recursive, no unnecessary data requests, etc)
@ -71,4 +112,4 @@
###### +Can it be open-sourced / be used for other sources?
###### +Would you recommend/nominate this program as an example for the rest of the school?
###### +Would you recommend/nominate this program as an example for the rest of the school?

4
subjects/forum/forum.en.md

@ -12,7 +12,7 @@ Your forum should work based on services. Using services to create a project mea
- For example for a taxi like application you can divide it in the following services : passenger management, billing, notifications, payments, trip management and driver management.
You can learn more about this [here](https://www.nginx.com/blog/introduction-to-microservices/).
- Services can [communicate](https://medium.com/@nathankpeck/microservice-principles-smart-endpoints-and-dumb-pipes-5691d410700f) using : **Request-Response**, this being that one service invokes another service by making an request, usually to store or retrieve data. Or **Observer**, this is a event base communication, so one or more services are listening for an event and wen triggered they respond to the event.
#### SQLite
@ -85,7 +85,7 @@ b64130fc5aae bridge bridge local
Your objective is to use the [`bridge` network](https://docs.docker.com/engine/tutorials/networkingcontainers/) to create your own network for the services. Docker connects to this network by default, creating a subnet and a gateway for the `bridge` network. The command `docker run` automatically adds containers to it. To inspect the network for more details you can just run `docker network inspect <network>`.
- Each service will have to run in a container that will be associated to a docker host, which must contain at least two containers/services and these must be connected to a bridge.
- Each service will have to run in a container that will be associated to a docker host, which must contain at least two containers/services and these must be connected to a bridge, creating a network for [example](https://docs.docker.com/engine/tutorials/bridge3.png).
- You must be careful, bridges are a private network, so it is restricted to a single Docker host, for instance containers can communicate within networks but not across networks.
- You may have to use [Port Mapping](https://docker-k8s-lab.readthedocs.io/en/latest/docker/port-mapping.html).

Loading…
Cancel
Save