|
|
|
|
|
by KronisLV
1523 days ago
|
|
> My first attempt uses the small alpine image, which already packages thttpd: # Install thttpd
RUN apk add thttpd
Wouldn't you want to use the --no-cache option with apk, e.g.: RUN apk add --no-cache thttpd
It seems to slightly help with the container size: REPOSITORY TAG IMAGE ID CREATED SIZE
thttpd-nocache latest 4a5a1877de5d 7 seconds ago 5.79MB
thttpd-regular latest 655febf218ff 41 seconds ago 7.78MB
It's a bit like cleaning up after yourself with apt based container builds as well, for example (although this might not always be necessary): # Apache web server
RUN apt-get update && apt-get install -y apache2 libapache2-mod-security2 && apt-get clean && rm -rf /var/lib/apt/lists /var/cache/apt/archives
But hey, that's an interesting goal to pursue! Even though personally i just gave up on Alpine and similar slim solutions and decided to just base all my containers on Ubuntu instead: https://blog.kronis.dev/articles/using-ubuntu-as-the-base-fo... |
|