I have a GoCD instance running inside a docker container. I want to build an angular2 project by angular-cli through the pipeline of GoCD. This works well, but I need to copy the built dist folder from the docker container to "/var/www/html/" folder on the host system.
Im very new to GoCD and docker. Can anyone help me?
Edit: One more questions is: where is the dist folder located after build finished?
Easy solution would be to bind mount local
/var/www/html
somewhere inside of your container and copy those files to that mounted directory which is now accessible from your container.How you can create the bind mount depends on how you are launching your container (docker cli or docker-compose...)
if you are using docker cli, you can use
-v
switchexample in
docker-compose