Comments (7)
Yes that would be all.
from fava-docker.
To minimize the image size, git is not part of the image anymore.
I would suggest to create your own image based on this image. You can use Debian 10 image as base, install git, then copy files in this image to the result image.
I'm not sure how familiar you are with Dockerfile, but I assume this is relatively straightforward. Let me know if you want an example.
from fava-docker.
Not very familiar, but from what I understand I would use two FROM (just like you do in your Dockerfile), and the 'real' FROM would be Debian or Alpine or something like that (where I'd install git), and from your image I'd just:-
- Copy /app
- Basically do all the env/entrypoint stuff which your Dockerfile does after copying /app
That sound about right?
from fava-docker.
So I tried a simple Dockerfile which looks like this:-
FROM yegle/fava:latest as built
FROM alpine:latest
COPY --from=built /app /app
RUN apk add --no-cache git python3 py3-setuptools py3-virtualenv
EXPOSE 5000
ENV BEANCOUNT_FILE ""
# Required by Click library.
# See https://click.palletsprojects.com/en/7.x/python3/
ENV LC_ALL "C.UTF-8"
ENV LANG "C.UTF-8"
ENV FAVA_HOST "0.0.0.0"
ENV PATH "/app/bin:$PATH"
ENTRYPOINT ["fava"]
It builds successfully (since it does almost nothing) but fava can't start with this error:-
Traceback (most recent call last):
File "/app/bin/fava", line5, in <module>
from fava.cli import main
ModuleNotFoundError: No module named 'fava'
Is there some venv stuff I'm missing?
from fava-docker.
Alpine probably won't work: it uses musl libc, which is not compatible with glibc. My image is built using glibc (beancount have some binary Python module)
I would suggest to use Debian slim as base image, install python3 and git, then copy /app from my image.
from fava-docker.
Also, you probably don't want to use the official Python image even if it's based on Debian. The code in my image is installed under a Python version specific directory (something like /app/lib/python-3.x, AFK so I might be wrong). If you install Python 3 in Debian 10, the version would match.
from fava-docker.
Ah, didn't think about glibc. This works then! For posterity:-
FROM yegle/fava:latest as built
FROM debian:buster-slim
COPY --from=built /app /app
RUN apt-get update && apt-get install -y \
git \
python3
EXPOSE 5000
ENV BEANCOUNT_FILE ""
# Required by Click library.
# See https://click.palletsprojects.com/en/7.x/python3/
ENV LC_ALL "C.UTF-8"
ENV LANG "C.UTF-8"
ENV FAVA_HOST "0.0.0.0"
ENV PATH "/app/bin:$PATH"
ENTRYPOINT ["fava"]
Thanks so much for your time and image!
from fava-docker.
Related Issues (19)
- Fava in Docker Image - /static/gen CSS and JS not found HOT 5
- Pybabel is missing HOT 4
- Change showCharts keyboard shorcut default: "Control+c" HOT 1
- how can I work with another main.bean files HOT 1
- Supporting extensions HOT 2
- v1.24 not available on Docker Hub HOT 2
- Regarding the issue of calling third-party plugins HOT 1
- Container immediately aborts with error HOT 5
- Include beanprice HOT 2
- language setting do not take effect HOT 7
- Failing with Multiple Beancount files HOT 1
- Image build is failing due to recursive `require-hashes` HOT 4
- Language selection not working HOT 1
- No fava-plugins package HOT 4
- Docker desktop HOT 1
- Fava not starting. HOT 7
- Feature Request: Support ARM HOT 19
- Container does not work without --port 5000:5000 option HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from fava-docker.