xbgmsharp / ipxe-buildweb

iPXE Prebuilt binary web interface
GNU General Public License v3.0
157 stars 63 forks source link

Create a Docker using alpine #60

Open xbgmsharp opened 4 years ago

xbgmsharp commented 4 years ago

Create a Docker using alpine to reduce disk usage. 306MB vs 582MB

REPOSITORY                               TAG                 IMAGE ID            CREATED             SIZE
xbgmsharp/ipxe-buildweb                  alpine              a42b85c4a88b        18 seconds ago      306MB
xbgmsharp/ipxe-buildweb                  ubuntu              2722181984c0        2 minutes ago       582MB
danielewood commented 4 years ago

If you are taking this route for the purpose of minification, you may want to take a look at this project: https://github.com/docker-slim/docker-slim

Hacker News discussion from last week.

xbgmsharp commented 4 years ago

Thanks for the tip, very interesting. However i already create the new dockerfile.

lps-rocks commented 4 years ago

I've built an Alpine version of this project here: https://github.com/lps-rocks/rom-o-matic

The resulting docker image is roughly 70MB in size - https://hub.docker.com/r/lpsrocks/rom-o-matic/tags

I tried using docker-slim but it actually increased the size of the image. The dependencies are also part of the image now. Only iPXE is cloned and prepped on boot which makes the docker image boot much much quicker with much lower resource usage. Also much less to break during the running of the image.