According to Docker docs, apt-get update and apt-get install should always be executed in the same RUN statement.
Is the same true for alpine? I tried to reproduce the cache issue mentioned in the docs, but apk add seems to always fetch the latest package list, regardless of the apk update.
FROM alpine:edge
RUN apk update
RUN apk add <any package>
Note: I used alpine:edge because of the frequent deployments. My reasoning was, when the package version changes, the apk add command should fail, because its using the cached version that no longer exists in the package list.