Skip to content

Commit 86cd7ac

Browse files
author
Panos
committed
adding docker functionality
1 parent b671d67 commit 86cd7ac

File tree

3 files changed

+41
-0
lines changed

3 files changed

+41
-0
lines changed

.dockerignore

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
venv/
2+
__pycache__/
3+
*.pyc
4+
*.pyo
5+
*.pyd
6+
.git/
7+
.gitignore
8+
github-trending-screenshot.png
9+
.DS_Store

Dockerfile

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
FROM python:3.9-slim
2+
3+
WORKDIR /app
4+
5+
# Copy requirements first for better caching
6+
COPY requirements.txt .
7+
RUN pip install --no-cache-dir -r requirements.txt
8+
9+
# Copy the application
10+
COPY github_trending/ ./github_trending/
11+
COPY setup.py .
12+
COPY README.md .
13+
14+
# Install the package
15+
RUN pip install -e .
16+
17+
# Run the CLI
18+
ENTRYPOINT ["github-trending"]

README.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ We like browsing GitHub's trending page, so we made a CLI version.
1616

1717
## Installation
1818

19+
### Local install
1920
```bash
2021
git clone https://github.com/your-username/github-trending-cli.git
2122
cd github-trending-cli
@@ -27,6 +28,19 @@ pip install -r requirements.txt
2728
pip install -e .
2829
```
2930

31+
### Docker
32+
```bash
33+
# Build and run
34+
git clone https://github.com/your-username/github-trending-cli.git
35+
cd github-trending-cli
36+
docker build -t github-trending-cli .
37+
docker run -it --rm github-trending-cli
38+
39+
# Or run different time ranges
40+
docker run -it --rm github-trending-cli --range weekly
41+
docker run -it --rm github-trending-cli -r monthly
42+
```
43+
3044
## Usage
3145

3246
```bash

0 commit comments

Comments
 (0)