alpine 3.10
This commit is contained in:
parent
d43d0646cd
commit
2b545b8549
2 changed files with 4 additions and 4 deletions
|
@ -1,4 +1,4 @@
|
||||||
FROM reg.zknt.org/zknt/python:3.6.6-r0
|
FROM reg.zknt.org/zknt/python:3.7.3-r0
|
||||||
|
|
||||||
COPY requirements.txt /app/requirements.txt
|
COPY requirements.txt /app/requirements.txt
|
||||||
WORKDIR /app
|
WORKDIR /app
|
||||||
|
|
6
app.py
6
app.py
|
@ -10,14 +10,14 @@ class Store:
|
||||||
def __init__(self, dbo):
|
def __init__(self, dbo):
|
||||||
self.db = dbo
|
self.db = dbo
|
||||||
|
|
||||||
def add_version(self, pkg, version, bdate, branch='v3.8', arch='x86_64'):
|
def add_version(self, pkg, version, bdate, branch='v3.10', arch='x86_64'):
|
||||||
pkg_key = json.dumps((pkg, branch, arch))
|
pkg_key = json.dumps((pkg, branch, arch))
|
||||||
versions = json.loads(self.db.get(pkg_key, "{}"))
|
versions = json.loads(self.db.get(pkg_key, "{}"))
|
||||||
if bdate not in versions:
|
if bdate not in versions:
|
||||||
versions[bdate] = version
|
versions[bdate] = version
|
||||||
self.db[pkg_key] = json.dumps(versions)
|
self.db[pkg_key] = json.dumps(versions)
|
||||||
|
|
||||||
def get_feed(self, pkgs=None, branch='v3.8', arch='x86_64'):
|
def get_feed(self, pkgs=None, branch='v3.10', arch='x86_64'):
|
||||||
items = []
|
items = []
|
||||||
if not pkgs:
|
if not pkgs:
|
||||||
pkgs = ['bash']
|
pkgs = ['bash']
|
||||||
|
@ -32,7 +32,7 @@ db = dbm.open('/data/cache', 'c')
|
||||||
pkg_store = Store(db)
|
pkg_store = Store(db)
|
||||||
|
|
||||||
|
|
||||||
def get_release(pkg, branch="v3.8", arch="x86_64"):
|
def get_release(pkg, branch="v3.10", arch="x86_64"):
|
||||||
req = requests.get(
|
req = requests.get(
|
||||||
"https://pkgs.alpinelinux.org/packages?name={}&branch={}&arch={}".format(
|
"https://pkgs.alpinelinux.org/packages?name={}&branch={}&arch={}".format(
|
||||||
pkg,
|
pkg,
|
||||||
|
|
Loading…
Reference in a new issue