When running the alpine docker container the first time and attempting an openssh install, the following happens:
ole@T:~$ docker run -it --rm alpine /bin/ash
/
As the answer is already given but I will add up something.
In the new version, If you want to install something without caching things locally, which is recommended for keeping your containers small, include the --no-cache
flag. Example:
apk add --no-cache openssh
This is a small gain, it keeps you from having the common rm -rf /var/cache/apk/*
at the end of your Dockerfile.