Skip to content

Commit ff92edb

Browse files
author
vivi
committed
Add Docker image
1 parent fe0a5c5 commit ff92edb

File tree

3 files changed

+36
-0
lines changed

3 files changed

+36
-0
lines changed

.dockerignore

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
__pycache__
2+
venv
3+
.env

.github/workflows/ci.yml

+23
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: ci
2+
3+
on:
4+
- push
5+
6+
jobs:
7+
docker:
8+
if: ${{ github.ref == 'refs/heads/main' }}
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Login to GitHub Container Registry
12+
uses: docker/login-action@v1
13+
with:
14+
registry: ghcr.io
15+
username: ${{ github.repository_owner }}
16+
password: ${{ secrets.CR_PAT }}
17+
- name: Set up Docker Buildx
18+
uses: docker/setup-buildx-action@v1
19+
- name: Build and push
20+
uses: docker/build-push-action@v2
21+
with:
22+
push: true
23+
tags: ghcr.io/${{ github.repository }}:latest

Dockerfile

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
FROM python:3.8
2+
3+
WORKDIR /usr/src/app
4+
5+
COPY requirements.txt .
6+
RUN pip install --no-cache-dir -r requirements.txt
7+
8+
COPY . .
9+
10+
CMD [ "python", "main.py" ]

0 commit comments

Comments
 (0)