delfick / photons

Python3.6+ asyncio framework for interacting with LIFX devices

Home Page:https://photons.delfick.com

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Reduce the size of the Docker image

Djelibeybi opened this issue · comments

Photons may require gcc to build its dependencies, but it doesn't need it at runtime. I reduced the size of my lifx-daydusk container by about 100MB (from 243MB to 143MB) by adding:

apt-get purge -y gcc && \
apt-get autoremove -y

Obviously added after pip install lifx-photons-core command. It should have the same result for your Photons Interactor container image.

We can add that and then add a step to making the image to make sure it's a single layer

I'm ambivalent about squashing images, so I'll leave that up to you. :)

without squashing the image would still be just as large

I've rearranged the Dockerfile RUN directives in #24 which should result in a smaller image without needing to squash it further.