Docker environment for Angular–part 42
Trying the alpine container from https://github.com/microsoft/vscode-dev-containers/tree/master/containers . It does not work – the error was that it cannot mount the binding folder . I figure that it was a Docker issue, https://blogs.msdn.microsoft.com/stevelasker/2016/06/14/configuring-docker-for-windows-volumes/ .
Then I had a problem with “ tarball data for @angular/compiler@8.2.14 seems to be corrupted” – delete package.json for this.
This is the result
- in folder .devcontainer : A DockerFileAng file that have a new line, RUN npm install -g @angular/cli
- in folder .devcontainer : A devcontainer.json file that have “appPort”: [4200], “postCreateCommand”: “npm i && echo ‘you should run npm start'”,
- Modified package.json, “start”: “ng serve –host 0.0.0.0”, – in order to publish the port.
Now I can open from VSCode with Remote Extension – and use there without installing on my PC anything but VSCode + Docker + Remote Extension
You can find the sources at https://github.com/ignatandrei/InfoValutar/commit/2aba3e9ed667d03728916a784a969e28b1026ec6
Leave a Reply