From de7c9109854f5c7ac73a54c41024b15ad7ed71a4 Mon Sep 17 00:00:00 2001 From: Tarskan <55380090+Tarskan@users.noreply.github.com> Date: Wed, 6 Oct 2021 15:58:12 +0200 Subject: [PATCH] Exercice finis --- 0_run/commands.sh | 7 ++++++- 1_dockerfile/bash/Dockerfile | 6 ++++++ 1_dockerfile/curl/Dockerfile | 6 ++++++ 1_dockerfile/python/Dockerfile | 10 ++++++++++ 2_compose/docker-compose.yml | 8 ++++++++ 2_compose/settings.json | 1 + 6 files changed, 37 insertions(+), 1 deletion(-) create mode 100644 2_compose/settings.json diff --git a/0_run/commands.sh b/0_run/commands.sh index cc1f786..a5025aa 100644 --- a/0_run/commands.sh +++ b/0_run/commands.sh @@ -1 +1,6 @@ -#!/bin/bash \ No newline at end of file +#!/bin/bash +#!part 1 +docker run --rm docker/whalesay cowsay "Hello M1 III 2021" + +#!part 2 +docker container run --rm -it python:3 python \ No newline at end of file diff --git a/1_dockerfile/bash/Dockerfile b/1_dockerfile/bash/Dockerfile index e69de29..ed53c8a 100644 --- a/1_dockerfile/bash/Dockerfile +++ b/1_dockerfile/bash/Dockerfile @@ -0,0 +1,6 @@ +FROM ubuntu:latest +LABEL maintainer="TP1" + +COPY to_run.sh /usr/app/bin/ + +ENTRYPOINT ["/usr/app/bin/to_run.sh"] \ No newline at end of file diff --git a/1_dockerfile/curl/Dockerfile b/1_dockerfile/curl/Dockerfile index e69de29..2984b99 100644 --- a/1_dockerfile/curl/Dockerfile +++ b/1_dockerfile/curl/Dockerfile @@ -0,0 +1,6 @@ +FROM ubuntu:latest +LABEL maintainer="TP1" + +RUN apt update && apt-get install -y curl + +ENTRYPOINT ["curl", "$arg1"] \ No newline at end of file diff --git a/1_dockerfile/python/Dockerfile b/1_dockerfile/python/Dockerfile index e69de29..9ab36c6 100644 --- a/1_dockerfile/python/Dockerfile +++ b/1_dockerfile/python/Dockerfile @@ -0,0 +1,10 @@ +FROM python:2.7 +LABEL maintainer="TP1" + +COPY requirements.txt /usr/app/bin/ + +RUN pip install -r /usr/app/bin/requirements.txt + +COPY app.py /usr/app/bin/ + +ENTRYPOINT ["app.py", "/usr/app/bin/app.py"] \ No newline at end of file diff --git a/2_compose/docker-compose.yml b/2_compose/docker-compose.yml index e69de29..3029d7d 100644 --- a/2_compose/docker-compose.yml +++ b/2_compose/docker-compose.yml @@ -0,0 +1,8 @@ +version: "3" +services: + web: + image: "convos/convos:stable" + ports: + - "2021:3000" + volumes: + - ".:/data" diff --git a/2_compose/settings.json b/2_compose/settings.json new file mode 100644 index 0000000..71329fa --- /dev/null +++ b/2_compose/settings.json @@ -0,0 +1 @@ +{"base_url":"http:\/\/localhost:16001\/","contact":"mailto:root@localhost","default_connection":"irc:\/\/irc.libera.chat:6697\/%23convos","forced_connection":false,"local_secret":"83f9fa7f25607a9aa749854f2e294efa5febb8f0","open_to_public":false,"organization_name":"Convos","organization_url":"https:\/\/convos.chat","session_secrets":["83e45496b3d75704d3d03b8a914e35b45a108a9a"],"video_service":"https:\/\/meet.jit.si\/"} \ No newline at end of file