-
Notifications
You must be signed in to change notification settings - Fork 185
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Added dockerfile and updated README #135
Conversation
Its also hosed on docker hub: https://hub.docker.com/r/terpz/pokete |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks a lot for your contribution!
Other publishing methods have been standing on our To-Do List for at least a couple of months!
Please just add a .dockerignore
file, containing the directories .git
and __pycache__
, as these directories are getting the image size WAAAY up.
After that, I think we are ready to merge!
Thanks for the docker hub idea. If you want, you could also contribute the GitHub Action to push to ghcr.io and docker hub. If not, I would look into it in the next coming days/weeks. |
Co-authored-by: MaFeLP <[email protected]>
Seems fair, regardin the version and the debian image. Eventhough im against the symlink in the dockerfile (just think it looks ugly ;) ) im willing to make an exception ^^ |
|
||
WORKDIR /usr/src/app | ||
|
||
RUN pip install --no-cache-dir scrap_engine && \ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RUN pip install --no-cache-dir scrap_engine && \ | |
RUN pip install --no-cache-dir scrap_engine playsound pygobject && \ |
I would suggest adding those two dependencies, which have been added with the Sound PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This wont build, because it needs libs and compilers in the image.
I will see what i can do, hopefully i can do some magic with multistage dockerbuild
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
you can build your container like so and save about 275MB~ over a non-multistage image:
FROM alpine:3.15 AS compile-image
RUN apk add \
python3-dev \
py3-pip \
py3-gst \
gobject-introspection-dev \
cairo-dev \
build-base
RUN python3 -m pip install --user scrap_engine playsound pygobject
From alpine:3.15
RUN apk add --no-cache \
python3-dev \
py3-gst
COPY --from=compile-image /root/.local /root/.local
ENV PATH="/root/.local/bin:$PATH"
RUN mkdir -p /root/.cache/pokete && \
ln -s /root/.cache/pokete /data
COPY . .
VOLUME ["/data"]
CMD [ "python", "./pokete.py" ]
Added the dockerfile from pull request #135, as there seems to be no more work being done on it. Currently sound does not work with docker. Co-authored-by: MartinTerp <[email protected]> Co-authored-by: Victim <94010769+anothervictimofsurvivalinstinct@users.noreply.github.com>
No description provided.