Installing package with apk breaks sudo on Docker for Azure VMSS'es

Expected behavior

Installing an apk should add the apk but for the rest nothing

Actual behavior

swarm-manager000000:~$ apk add rsync
ERROR: Unable to lock database: Permission denied
ERROR: Failed to open apk database: Permission denied
swarm-manager000000:~$ sudo apk add rsync
OK: 38 MiB in 54 packages
swarm-manager000000:~$ sudo
-sh: sudo: not found

Additional Information

Tried multiple with multiple packages (rsync and bash-completion), had to completely remove the vmss and start over. Restarting the vmss does not resolve the problem

Steps to reproduce the behavior

  1. Use the docker for azure template
  2. SSH to the docker manager
  3. Add the rsync apk

When logging in to Docker for Azure, your session is hosted in an ephemeral container and any changes that you make won’t be persisted in case that manager node is replaced and won’t be reflected if you happen to start a session on a different manager.

In general, you should try to run software in containers on Docker for Azure - looking on Docker Hub it looks like there are several rsync images. What is your higher-level level goal for running rsync on Docker for Azure?

My higher level goal is not specifically rsync, I am just trying to get some apk packages installed to make it myself a bit easier. For example (docker) bash completion and rsync to get some files in my home folder for my vi settings and stuff like that.

On slack they gave me a workaround for the moment, first do an sudo apk add sudo, after that you can use apk