mirror of
https://github.com/cupcakearmy/tumbo.git
synced 2025-12-11 08:15:01 +00:00
examples
This commit is contained in:
13
examples/full/build/Dockerfile.j2
Normal file
13
examples/full/build/Dockerfile.j2
Normal file
@@ -0,0 +1,13 @@
|
||||
FROM python:{{ python_version }}-{{base_image}}
|
||||
|
||||
RUN pip install termcolor=={{ package_version }}
|
||||
|
||||
WORKDIR /app
|
||||
|
||||
{% if package_version == '1.1.0' %}
|
||||
COPY ./new.py main.py
|
||||
{% else %}
|
||||
COPY ./old.py main.py
|
||||
{% endif %}
|
||||
|
||||
CMD [ "python", "main.py" ]
|
||||
3
examples/full/build/new.py
Normal file
3
examples/full/build/new.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from termcolor import cprint
|
||||
|
||||
cprint('Hello 👋', 'blue', attrs=['bold'])
|
||||
3
examples/full/build/old.py
Normal file
3
examples/full/build/old.py
Normal file
@@ -0,0 +1,3 @@
|
||||
from termcolor import colored
|
||||
|
||||
print(colored('Hello 👋', 'blue', attrs=['bold']))
|
||||
Reference in New Issue
Block a user