Skip to content
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

Lighter docker setup #1

Closed
davidzwa opened this issue Jan 10, 2020 · 4 comments
Closed

Lighter docker setup #1

davidzwa opened this issue Jan 10, 2020 · 4 comments

Comments

@davidzwa
Copy link

Thanks for sharing! Your docker setup is not as fast as it could be, so I though to share a simple setup which works for me:

FROM python:3
ADD [ "examples", "/examples" ]    
RUN pip install zeroconf

WORKDIR /examples

CMD ["bash"]

This is much easier to understand for developers, because all we need to know is: does it have python and are my packages installed 👍

@kalemena
Copy link
Owner

Thanks for sharing too, davidzwa.
While writing this Dockerfile example, I had my own use case in mind where base image must be CentOS because zeroconf is not the only installed brick.
But you're right here!

@davidzwa
Copy link
Author

davidzwa commented Jan 11, 2020

Btw, did you have Zeroconf outside the docker network working? I can't discover any device which is running on my LAN. I've seen stuff like multicast being not supported by docker.

Quite a hard question, I believe, but had to try.
So far I've hit a wall: moby/libnetwork#552

@kalemena
Copy link
Owner

Unfortunately, I cannot respond to that one :-/

I just changed Dockerfile with your proposal.

Just a note: python:3 base image is 930MB, while CentOS is 200MB.
I am not looking after size reduction, but some people may be.

@davidzwa
Copy link
Author

slim-buster or alpine should do the trick! :)
https://pythonspeed.com/articles/base-image-python-docker-images/

Thx for the adjustment

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants