Skip to content

Commit

Permalink
add comment into docker slides
Browse files Browse the repository at this point in the history
  • Loading branch information
lougranou committed Mar 25, 2019
1 parent 228fc5c commit 76905b6
Show file tree
Hide file tree
Showing 5 changed files with 22 additions and 6 deletions.
1 change: 1 addition & 0 deletions Laboratoire/Teaching-Docker-SimpleJavaServer
Submodule Teaching-Docker-SimpleJavaServer added at a9ca71
15 changes: 14 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,25 @@ This is where you will find lecture notes, slides and some of the examples prese
* Be ready for a challenging week
* Understand and be able to explain the following concepts:
* What is Docker? How are containers different from virtual machines?


* What is the difference between the Docker CLI and the Docker engine? Why can we say that Docker is based on a client-server architecture?
* Docker Client : This is the utility we use when we run any docker commands e.g. docker run (docker container run) , docker images , docker ps etc. It allows us to run these commands which a human can easily understand.
* Docker Daemon/Engine: This is the part which does rest of the magic and knows how to talk to the kernel, makes the system calls to create, operate and manage containers, which we as users of docker dont have to worry about.

* What is the difference between a Docker image and a Docker container?
* Image are models to create the shape of a docker
* Docker is the instance create thank to the image
* How does one create a Docker image? How does one create a Docker container?
* We have to build our own image with a Dockerfile with `docker run`
* Once we have the image we can create an instance of the image with `docker run`
* What is Dockerhub?
* Be able to explain what happens when you type `docker run -it —rm alpine /bin/sh`. Be able to explain the meaning of every argument in this command.
* Docker Hub is a big library containings a lot of images private or publi
* Be able to explain what happens when you type `docker run -it —rm alpine /bin/sh`.
* i for interacitve, t for terminal, -rm is non-sens, run an instance of the image alpine, a lightweight linux
* Be able to explain the meaning of every argument in this command.
* Be able to explain how port mapping works in Docker. Be able to explain how to use the `-p xx:yy`parameter when using `docker run`.
* -p Publish a container's port, or range of ports, to the host. <host_port>:<docker_port>
* Have been able to run the [demo 1](https://github.com/SoftEng-HEIGVD/Teaching-Docker-SimpleJavaServer) on one's laptop during the week.
* Be able to perform the following operations
* Write a Dockerfile to define an image that contains a TCP server written in Java
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public class StreamingTimeServer {

private final int TEST_DURATION = 15000;
private final int PAUSE_DURATION = 1000;
private final int NUMBER_OF_ITERATIONS = TEST_DURATION / PAUSE_DURATION;
private final int NUMBER_OF_ITERATIONS = 1 ;//TEST_DURATION / PAUSE_DURATION;
private final int LISTEN_PORT = 2205;

/**
Expand Down Expand Up @@ -67,6 +67,12 @@ public void start() {
Thread.sleep(PAUSE_DURATION);
}

while( reader.read() ){

}

System.out.println("client dit : " + (char)reader.read());

reader.close();
writer.close();
clientSocket.close();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -107,6 +107,4 @@ private void cleanup() {
LOG.log(Level.SEVERE, ex.getMessage(), ex);
}
}


}
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,5 @@ private void disconnect() {
connected = false;
cleanup();
}

}

}

0 comments on commit 76905b6

Please sign in to comment.