diff --git a/04-containers/solutions/ilayda/exercise1/Dockerfile b/04-containers/solutions/ilayda/exercise1/Dockerfile new file mode 100644 index 0000000..41b7116 --- /dev/null +++ b/04-containers/solutions/ilayda/exercise1/Dockerfile @@ -0,0 +1,19 @@ +FROM python:3.9-slim + +## Install click 7.1.2 uisng pip from PyPI +RUN pip install click==7.1.2 + +## set working directory to /opt +WORKDIR /opt + +## Copy the app.py file to /opt +COPY app.py /opt + +## Make app.py executeable +RUN chmod +x /opt/app.py + +## Add app.py to the path +RUN export PATH=/opt:$PATH + +## Run the application +CMD ["python", "/opt/app.py", "--name", "ilayda"] diff --git a/04-containers/solutions/ilayda/exercise1/README.md b/04-containers/solutions/ilayda/exercise1/README.md new file mode 100644 index 0000000..8ed1022 --- /dev/null +++ b/04-containers/solutions/ilayda/exercise1/README.md @@ -0,0 +1 @@ +ilayda typing nicely diff --git a/04-containers/solutions/ilayda/exercise1/app.py b/04-containers/solutions/ilayda/exercise1/app.py new file mode 100644 index 0000000..e123006 --- /dev/null +++ b/04-containers/solutions/ilayda/exercise1/app.py @@ -0,0 +1,17 @@ +import click + +@click.command() +@click.option('--name', default='ilayda', help='Name of the participant.') +@click.version_option(version='1.1.0') +def main(name): + """ + A demo App for BIOS259: The Art of Reproducible Science + https://github.com/asntech/bios259-a24 + + Author: Aziz Khan + """ + + print(f"Hello, {name}!\nWelcome to BIOS259 – The Art of Reproducible Science") + +if __name__ == "__main__": + main()