Introducing Docker and VSCode Environment to Your ObjectScript Github Repository
Suppose you have a Github repository with ObjectScript classes but without a Docker environment.
Recently I published a repository with a set of files that form a universal Docker and VSCode environment to let you either import and run your repository in InterSystems IRIS Community Edition on Docker or turn your repository into Docker and VSCode environment for InterSystems IRIS Community Edition.
So in one sentence:
Unpack these files in your folder and you have the Docker and VSCode environment for your InterSystems IRIS ObjectScript application!
See the details below.
How does it work?
Download the latest archive from the release.
Clone the repository you want to work with, unpack and copy all the files from archive to the root of your repository folder.
Check the line 16 of the Dockerfile. Usually, it looks like this:
COPY src src
it copies all files from /src folder of repository to currentdir/src of docker container to import it then.
Make sure your source code in /src folder, and if not just change the line accordingly.
If you have more than one folder or several files - repeat line 16 several times in Docker file to copy it all to the container.
Save the changes of Dockerfile.
Right-click on the docker-compose.yml file and click Compose Restart
Once docker will finish starting procedure and show:
Creating objectscript-contest-template_iris_1 ... done
Click on the ObjectScript status bar and select Refresh connection in the menu. Wait for VSCode to make a connection and show something like "localhost:32778[IRISAPP] - Connected"
Your code will be imported into IRISAPP namespace.
Open IRIS terminal from either VSCode extension or via Docker extension:
And you can run ObjectScript code in the terminal.
Open ObjectScript files and if you edit and save it will be compiled in InterSystems IRIS docker container.
You can commit and push changes then into your Github repository.
Hope you'll find this project useful!