Skip to content

Commit

Permalink
Merge pull request #6 from saskialynn/saskiaco
Browse files Browse the repository at this point in the history
Saskia's exercise 1 commit
  • Loading branch information
saskialynn authored Dec 5, 2024
2 parents dd9cedd + 6ef08e8 commit 448ca4d
Show file tree
Hide file tree
Showing 2 changed files with 36 additions and 0 deletions.
19 changes: 19 additions & 0 deletions 04-containers/solutions/saskiaco/exercise1/Dockerfile
Original file line number Diff line number Diff line change
@@ -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", "Participant"]
17 changes: 17 additions & 0 deletions 04-containers/solutions/saskiaco/exercise1/app.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
import click

@click.command()
@click.option('--name', default='Saskia', help='Name of the participant.')
@click.version_option(version='1.0.1')
def main(name):
"""
A demo App for BIOS259: The Art of Reproducible Science
https://github.com/asntech/bios259-a24
Author: Aziz Khan <[email protected]>
"""

print(f"Hello, {name}!\nWelcome to BIOS259 – The Art of Reproducible Science")

if __name__ == "__main__":
main()

0 comments on commit 448ca4d

Please sign in to comment.