Closed vijaygill closed 5 months ago
I thought the purpose of that script was to do the initial boot strap of the container? It was described in the deenv.md file that you only need to run it once when you first clone, and from then you can use the other two scripts. In #3 I made changes so that even from a clean state, you can just dive straight into running ./build-dev-run-ng-build.sh
and it will handle doing the 'run-bash' for you.
@thecoshman - No. I use that script to keep my host machine clean too. All dev tools are in the image only.
I like the changes you made to the shell script ng-build.sh
to build for the first time! It's just this shell script makes my life easier for running all other "ng" commands to generate code for angular.
Oh I see, so that terminal you initially said that was a 'first run' thing, where you ran the command and then exit the container, you would have been using that container you interact with so that you've got a shell where you can run ng
commands as required?
@thecoshman - yes, spot on! Sorry I should have mentioned that too in the readme. This bash shell gives me complete dev environment - ng, npm, git etc. I am planning to add codium also to it so it can run editor also within it. This way my host machine remains clean.
Ah ok. I'll look to restore that. I might also look to have the three containers named. So when you run docker ps
you'd see something like wg-ui-py
, wg-ui-ag
and wg-ui-dev-sh
. Probably also have the dev shell not auto-removed? That way, if you run some commands to install some things to help out, then exit (probably accidentally) you don't have to re-run that when you start up again.
Probably a future idea, but maybe have a base dev image, then the python, ng and interactive dev containers can build on that... but for the sake of local dev image/containers, I can't be bothered thinking that through right now :sweat_smile:
@thecoshman - having one image for dev and another for production deployment is enough I guess. To keep things simple. I like the idea of naming the containers. Installing stuff (apt or pip) is not allowed in containers as they run under pi user. Whereas those commands need root access. This is why any deployment needs changes to Dockerfile (and hence those multiple RUN commands which I always merge near the end of the completion of the project).
I use this script to run a bash shell the dev-container.
I do not want to install npm/ng and all that stuff on my host machine, but I want shell prompt where all my dev tools for this project are present.