forked from danyaberezun/Linux-basics-2020
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtask2.txt
39 lines (39 loc) · 1.18 KB
/
task2.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
# print your commands
retired@retired:~/Linux-basics-2020$ sudo docker pull python
Using default tag: latest
latest: Pulling from library/python
e4c3d3e4f7b0: Already exists
101c41d0463b: Pull complete
8275efcd805f: Pull complete
751620502a7a: Pull complete
0a5e725150a2: Pull complete
397dba5694db: Pull complete
b1d09d0eabcb: Pull complete
475299e7c7f3: Pull complete
d2fe14d8e6bc: Pull complete
Digest: sha256:0a9325e9adb51dd65ec915036e270eae33087918fc1254f6a22a436741600b17
Status: Downloaded newer image for python:latest
docker.io/library/python:latest
retired@retired:~/Linux-basics-2020$ nano Dockerfile
retired@retired:~/Linux-basics-2020$ sudo docker build .
Sending build context to Docker daemon 775.7kB
Step 1/3 : FROM python
---> 5336a27a9b1f
Step 2/3 : COPY . .
---> f87d9c752933
Step 3/3 : CMD [ "python", "src/server.py" ]
---> Running in 70bc022322ad
Removing intermediate container 70bc022322ad
---> 062a4ae766b5
Successfully built 062a4ae766b5
retired@retired:~/Linux-basics-2020$ sudo docker run -p 65432:65432 062a4ae766b5&
[2] 237505
retired@retired:~/Linux-basics-2020$ telnet localhost 65432
Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
A
OK:A
B
OK:B
^D