Browse Source

rendu final TP docker

main
Zelleg 5 years ago
parent
commit
475ebbcd63
  1. 6
      0_run/commands.sh
  2. 1
      0_run/test.py
  3. 2
      1_dockerfile/Readme.md
  4. 7
      1_dockerfile/bash/Dockerfile
  5. 4
      1_dockerfile/bash/commandes_a_lancer.txt
  6. 6
      1_dockerfile/curl/Dockerfile
  7. 13
      1_dockerfile/python/Dockerfile
  8. 10
      2_compose/docker-compose.yml

6
0_run/commands.sh

@ -1 +1,7 @@
#!/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

1
0_run/test.py

@ -0,0 +1 @@
print("-------Ceci est un test en python---------")

2
1_dockerfile/Readme.md

@ -1,3 +1,5 @@
#NOM_Prenom
#ZELLEG_Massyl
# Dockerfile tp
Write dockerfile for each folder.

7
1_dockerfile/bash/Dockerfile

@ -0,0 +1,7 @@
FROM ubuntu:latest
COPY to_run.sh to_run.sh
CMD [ "/bin/bash", "to_run.sh" ]

4
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

6
1_dockerfile/curl/Dockerfile

@ -0,0 +1,6 @@
FROM ubuntu:latest
RUN apt-get update; apt-get install -y curl
ENTRYPOINT ["curl"]

13
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"]

10
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 :)
Loading…
Cancel
Save