jedisct1/dnscrypt-server-docker

Is uninstall of BUILD_DEPS working correctly?

mibere opened this issue · 2 comments

Can it be that the command

RUN set -x && \
    echo apk del --purge $BUILD_DEPS && \
    echo rm -rf /tmp/* /var/tmp/* /usr/local/include

in the Dockerfile isn't executed correctly or as expected?

All listed packages ($BUILD_DEPS) are still installed in the container after starting it.

Maybe this behavior is "by design". Found this comment

Your commands to remove packages and clean up cache are in new layers. You cannot remove stuff from previous layers already committed (this is a fundamental Docker thing). Remove the packages and clean up the command in the same layer by adding on to the compound command:

Every RUN seems to be a new layer, and therefore "apk del..." doesn't work.

Inded I can check git version