forked from gaugendre/ofx-processor
Add dockerfile
This commit is contained in:
parent
9ab6cd8e04
commit
d10ac65365
2 changed files with 25 additions and 0 deletions
13
Dockerfile
Normal file
13
Dockerfile
Normal file
|
@ -0,0 +1,13 @@
|
||||||
|
FROM debian:bullseye AS downloader
|
||||||
|
WORKDIR /app
|
||||||
|
RUN apt-get update && apt-get install -y wget
|
||||||
|
ARG GECKODRIVER_VERSION="v0.30.0"
|
||||||
|
ARG GECKODRIVER_FILENAME="geckodriver-$GECKODRIVER_VERSION-linux64"
|
||||||
|
RUN wget -q https://github.com/mozilla/geckodriver/releases/download/v0.30.0/$GECKODRIVER_FILENAME.tar.gz && tar xvf $GECKODRIVER_FILENAME.tar.gz && rm $GECKODRIVER_FILENAME.tar.gz
|
||||||
|
|
||||||
|
FROM python:3.10-slim-bullseye as final
|
||||||
|
RUN apt-get update && apt-get install -y firefox-esr
|
||||||
|
COPY --from=downloader /app/geckodriver /usr/local/bin/geckodriver
|
||||||
|
ARG OFX_VERSION
|
||||||
|
RUN pip install ofx-processor==$OFX_VERSION
|
||||||
|
CMD ["ynab", "lcl", "--download"]
|
12
tasks.py
12
tasks.py
|
@ -37,3 +37,15 @@ def publish(ctx):
|
||||||
if username and password:
|
if username and password:
|
||||||
args = f"--username {username} --password {password}"
|
args = f"--username {username} --password {password}"
|
||||||
ctx.run(f"poetry publish --build {args}", pty=True, echo=False)
|
ctx.run(f"poetry publish --build {args}", pty=True, echo=False)
|
||||||
|
|
||||||
|
|
||||||
|
@task
|
||||||
|
def publish_docker(ctx):
|
||||||
|
with ctx.cd(BASE_DIR):
|
||||||
|
docker_image = "rg.fr-par.scw.cloud/crocmagnon/ynab"
|
||||||
|
ctx.run(
|
||||||
|
f"docker build --build-arg OFX_VERSION=$(poetry version -s) -t {docker_image} .",
|
||||||
|
pty=True,
|
||||||
|
echo=True,
|
||||||
|
)
|
||||||
|
ctx.run(f"docker push {docker_image}", pty=True, echo=True)
|
||||||
|
|
Loading…
Reference in a new issue