Making development in Docker environment easier
Working with community images from intersystemsdc is quite comfortable
Though there are limits that are fine for distribution but not so fine for development.
I want to share with you my personal hacks that make it simpler.
Download a template from GitHub is the default.
As I use Docker desktop on Win10 I want to use my Cube to access -
- So I need fixed ports for access to fill the list of registered instances.
Therefore I add fixed ports into docker-compose.yml
- Next, I map a local directory for the exchange of files with my container at runtime to directory /external
docker-compose.yml finally looks like this:
- The next limit I struggled with was: no simple text editor.
My personal preference is nano.
adding a single line to Dockerfile under USER root solved this:
RUN apt-get update && apt-get -y install nano
- Finally entering my container by docker-compose exec iris bash
I found myself on Linux shell as irisowner with almost no rights.
Which is quite embarrassing if you need to arrange other components as Nodes.js or Python
Another line added to Dockerfile under USER root to set a root_pw solved this:
RUN echo "root:iris-1205" | chpasswd
Now you can get full control over YOUR container by su root + the pw
It is clear that you won't add this enhanced docker-compose.yml and Dockerfile to your public repository.
But during development, you are pretty unlimited and relaxed.