diff --git a/0_run/commands.sh b/0_run/commands.sh index cc1f786..e259b31 100644 --- a/0_run/commands.sh +++ b/0_run/commands.sh @@ -1 +1,7 @@ -#!/bin/bash \ No newline at end of file +#!/bin/bash +# show docker/whalesay image +docker run --rm docker/whalesay cowsay "Hello M1 III 2021" +# Interactive python shell +docker run --rm -it python:3 + + diff --git a/0_run/test.py b/0_run/test.py new file mode 100644 index 0000000..c9b0f3c --- /dev/null +++ b/0_run/test.py @@ -0,0 +1 @@ +print("-------Ceci est un test en python---------") diff --git a/1_dockerfile/Readme.md b/1_dockerfile/Readme.md index 7361a11..f71b28c 100644 --- a/1_dockerfile/Readme.md +++ b/1_dockerfile/Readme.md @@ -1,3 +1,5 @@ +#NOM_Prenom +#ZELLEG_Massyl # Dockerfile tp Write dockerfile for each folder. diff --git a/1_dockerfile/bash/Dockerfile b/1_dockerfile/bash/Dockerfile index e69de29..d0a1139 100644 --- a/1_dockerfile/bash/Dockerfile +++ b/1_dockerfile/bash/Dockerfile @@ -0,0 +1,7 @@ +FROM ubuntu:latest + +COPY to_run.sh to_run.sh + +CMD [ "/bin/bash", "to_run.sh" ] + + diff --git a/1_dockerfile/bash/commandes_a_lancer.txt b/1_dockerfile/bash/commandes_a_lancer.txt new file mode 100644 index 0000000..f2bcc29 --- /dev/null +++ b/1_dockerfile/bash/commandes_a_lancer.txt @@ -0,0 +1,4 @@ +#command to build the docker image +docker image build -t my-bash . +#run the container +docker run --rm my-bash diff --git a/1_dockerfile/curl/Dockerfile b/1_dockerfile/curl/Dockerfile index e69de29..411b87d 100644 --- a/1_dockerfile/curl/Dockerfile +++ b/1_dockerfile/curl/Dockerfile @@ -0,0 +1,6 @@ +FROM ubuntu:latest + +RUN apt-get update; apt-get install -y curl + +ENTRYPOINT ["curl"] + diff --git a/1_dockerfile/python/Dockerfile b/1_dockerfile/python/Dockerfile index e69de29..c95e5f5 100644 --- a/1_dockerfile/python/Dockerfile +++ b/1_dockerfile/python/Dockerfile @@ -0,0 +1,13 @@ +FROM python:2.7 + +COPY app.py requirements.txt ./ + +RUN python -m pip install --upgrade pip + +RUN pip install -r requirements.txt + +EXPOSE 5000 + +ENTRYPOINT ["python"]  + +CMD ["app.py"] diff --git a/2_compose/docker-compose.yml b/2_compose/docker-compose.yml index e69de29..5a0b301 100644 --- a/2_compose/docker-compose.yml +++ b/2_compose/docker-compose.yml @@ -0,0 +1,10 @@ +version: "3.3" +services: + convos: + image: "convos/convos:v6.31" + ports: + - "2021:3000" + volumes: + - ./convos/data:/data + +# docker-compose up :)