tangled
alpha
login
or
join now
dotslash-baunthy.tngl.sh
/
docker
0
fork
atom
Studying docker
0
fork
atom
overview
issues
pulls
pipelines
Add Python example
Akshit Baunthiyal
3 weeks ago
bd7bb3f2
f7ad7e73
+16
2 changed files
expand all
collapse all
unified
split
python-app-starting-setup
Dockerfile
rng.py
+5
python-app-starting-setup/Dockerfile
···
1
1
+
FROM python:3.9-slim
2
2
+
WORKDIR /app
3
3
+
COPY . /app
4
4
+
EXPOSE 80
5
5
+
CMD ["python", "rng.py"]
+11
python-app-starting-setup/rng.py
···
1
1
+
from random import randint
2
2
+
3
3
+
min_number = int(input('Please enter the min number: '))
4
4
+
max_number = int(input('Please enter the max number: '))
5
5
+
6
6
+
if (max_number < min_number):
7
7
+
print('Invalid input - shutting down...')
8
8
+
else:
9
9
+
rnd_number = randint(min_number, max_number)
10
10
+
print(rnd_number)
11
11
+