WARNING: These containers include an as-yet unreleased version of Dyalog and are for testing purposes only
This container provides access to a Dyalog APL interpreter, with support for interactive debugging via RIDE or a web browser. The container is built using a Dockerfile and startup script which can be found in the Dyalog/DyalogDocker GitHub repository.
| Tag | Description |
|---|---|
| dyalog/techpreview:latest | Latest version of Dyalog APL |
| Tag | Description |
|---|---|
| dyalog/techpreview:{version} | {version} of APL. E.G. dyalog/techpreview:21.0 |
dotnet specific containers as of 20.0.odbc specific containers as of 19.0.Dyalog's Remote IDE (RIDE) is recommended for interactive use and debugging of the container. You can either download RIDE from GitHub and install it locally, or you can configure the interpreter to serve RIDE up as a web application and connect to it using a web browser. Either option requires opening a port and set the RIDE_INIT environment variable:
To connect from a local RIDE, use the serve keyword, after which you can connect RIDE and establish an interactive session. In this example, we use port 4502:
docker run -e RIDE_INIT=serve:*:4502 -p 4502:4502 dyalog/techpreview
To connect a web browser, use the http keyword, after which you can connect your browser, in this example to http://localhost:8888.
docker run -e RIDE_INIT=http:*:8888 -p 8888:8888 dyalog/techpreview
It is also possible to start an interactive session without RIDE simply by starting the container with the --interactive and --tty switches (or -it for short). Note that there is no APL keyboard support in this mode:
docker run -it dyalog/techpreview
If you do not set RIDE_INIT or enable -it, the container will terminate on return to immediate execution.
If you map directories into the container using the -v switch, your APL session will be able to load source code and data from these directories. The next sections describes how you can configure the container to run code that is mapped into it.
If you set one of the environment variables LOAD, CONFIGFILE or DYAPP in the container at startup, the settings will be used by the interpreter when it is launched. For example, if the directory /home/mkrom/myapp contains your application, you can mount this directory into the running image as /myapp and start your application from the workspace boot.dwswithin the directory as follows:
docker run -v /home/mkrom/myapp:/myapp -e LOAD=/myapp/boot.dws
As the application runs, any changes that it makes to the directory will immediately be visible from outside the container. You will need to add the settings for RIDE if you want to be able to interact with the application while it is running (other than by inspecting the contents of mapped directories).
When the container starts, it runs the entrypoint script. If none of the environment variables mentioned in the previous section are set, the script looks for a directory called /app, and if the directory contains APL code or a configuration file which the script is able to identify, it will be used to automatically launch your application. The script searches for:
.dcfg. Note that the file must have a setting for the LX parameter if it is to start an application..aplf, namespace .apln or class .aplc..dyapp (note that these are considered deprecated)..dws.If the mapped folder does not match any of the above constraints, APL is started with a clear workspace.
For example, if you have a directory which contains a single APL function:
$ cat /home/mkrom/helloworld/helloworld.aplf
helloworld
⎕←'Hello World!'
Then you can start a container which runs the function my mapping the folder into the container as /app:
$ docker run -v /home/mkrom/helloworld:/app dyalog/techpreview
_______ __ _ ____ _____
| __ \ \ / //\ | | / __ \ / ____|
|_| | \ \_/ // \ | | | | | | |
| |\ // /\ \ | | | | | | | _
____| | | |/ / \ \| |___| |__| | |__| |
|_____/ |_/_/ \_\______\____/ \_____|
https://www.dyalog.com
found aplf file Launching with LOAD=/app/helloworld.aplf
Dyalog APL/S-64 Version 18.2.45333
Serial number: UNREGISTERED - not for commercial use
+-----------------------------------------------------------------+
| Dyalog is free for non-commercial use but is not free software. |
| A basic licence can be used for experiments and proof of |
| concept until the point in time that it is of value. |
| For further information visit |
| https://www.dyalog.com/prices-and-licences.htm |
+-----------------------------------------------------------------+
Mon Mar 7 11:03:02 2022
Loaded: #.helloworld from "/app/helloworld.aplf"
Hello World!
If you follow the instructions for enabling RIDE that you can find at the start of this document , the container will not terminate after running the loaded code (unless the code itself ends the APL session), but pause and allow debugging. If changes are made to the files in the /app directory, they will be reflected in the mapped directory (in this case /home/mkrom/helloworld).
These are ODBC specific environment variables to make it easier to connect to a database, Currently we have included MySQL and MariaDB connectors in the container.
| Variable | Description | Default |
|---|---|---|
| SQL_DSN | DSN Name | $SQL_DATABASE |
| SQL_DATABASE | SQL Database Name | |
| SQL_SERVER | SQL Database Server IP or hostname | |
| SQL_PORT | TCP Port for ther Database Server | 3306 |
| SQL_DRIVER | SQL ODBC Driver to use (one of MySQL or MariaDB) | MySQL |
| SQL_USER | SQL Username to connect to the database | |
| SQL_PASSWORD | SQL Password to connect to the database |
You can build your own container images based on dyalog/techpreview using the statement FROM dyalog/techpreview in a dockerfile. This will give you a container which contains the Dyalog APL interpreter as /opt/mdyalog/20.0/64/unicode/dyalog.
Review the entrypoint script for an example of how to launch the interpreter.
Dyalog is free for non-commercial use but is not free software. Please see here for our Licence Agreement and full Terms and Conditions. Note that:
*limited support - Dyalog does not offer standard support for this container, it is included for convenience and migration only.
Content type
Image
Digest
sha256:6444f7cce…
Size
230.3 MB
Last updated
1 day ago
docker pull dyalog/techpreview