What you're seeing is an artifact of VS's fast mode contaienr debugging (see here for details). The image / container used for debugging in the Debug configuration only works within VS. If you right-click on the Dockerfile you can build a full image that is usable outside of VS.