Dockerfile
See original GitHub issueThere is a Docker-Hovercraft repo (automated build to the docker hub registry). The “latest” version used there is 2.4
. It’s not ideal to have the Dockerfile in a separate repo as automatic building is not triggered there when the actual hovercraft repo is updated.
The problem is, that for each hovercraft! release the Dockerfile on https://github.com/phpcommunity/docker-hovercraft/ would require an update… At least this is how I presume docker automatic build does work (I never used it myself).
It would be more useful if the Dockerfile was actually provided within this repository and bound to automatically build an image and publish it to docker hub from here.
If the Dockerfile resided here the docker image could be automatically built and uploaded to docker hub.
I’m not certain if it would be possible to reflect the master branch. I assume the upload of a python app to pip is done manually? Alternatively the Dockerfile could be written to directly build the app into the image. Something along the lines (not a perfect example):
FROM python:3-alpine
RUN apk add --no-cache --virtual .build build-base \
libxml2-dev libxslt-dev
COPY * /source/
WORKDIR /source
RUN python setup.py install \
&& mkdir /presentation
WORKDIR /presentation
EXPOSE 9000
ENTRYPOINT ["hovercraft", "--port", "0.0.0.0:9000"]
CMD ["/presentation"]
However, this lead me to a ~280MB image instead of the nice ~75MB with pip install… A multi-stage build with a distroless image could make it much smaller. However, I’m not at all familiar with python, so I’m really uncertain which files are required. And I wouldn’t want to recommend using Bazel…
I’m uncertain whether it would be possibile to use the phpcommunity hovercraft docker repo for this.
Perhaps @ramsey can state his opinion.
Issue Analytics
- State:
- Created 5 years ago
- Comments:7 (3 by maintainers)
Top GitHub Comments
I’m happy to link to someone that will keep a docker environment including Hovercraft up to date, but I can’t do it myself, and I don’t think it should be in this repository.
I see. I revisit hovercraft every few months, testing it out. Usually after having a brand new environment, I don’t use python, so testing hovercraft is this chore that repeats. I’m ashamed to say, I’m not totally hooked on Markdown as a presentation platform, but out of most of the projects, yours is the one that I find the most interesting / flexible.
I created a successful
Dockerfile
anddocker-compose.yaml
but maintaining it long term on a separate place doesn’t seem too effective.I am more than willing to help maintain it here as part of your project, addressing any issues that arise.
Note - I’m not talking about maintaining a docker image in a registry, just the
Dockerfile
anddocker-compose.yaml
files for local consumption.These are in no way complex, and the instructions are quite simple. If you’re interested, I’ll be happy to open a PR for that.