Sign inSign up

dyalog/techpreview

By dyalog

Updated 1 day ago

Image
0

10K+

dyalog/techpreview repository overview

dyalog/techpreview Container

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.

Repository TAGS

Latest Version
TagDescription
dyalog/techpreview:latestLatest version of Dyalog APL
Version Specific
TagDescription
dyalog/techpreview:{version}{version} of APL. E.G. dyalog/techpreview:21.0
Container Updates
  • The base containers now include the DOTNET (8.0) runtime. As a result we have removed the dotnet specific containers as of 20.0.
  • The base containers now include the unixODBC with MariaDB & MySQL connectors built in. As a result we have removed the odbc specific containers as of 19.0.
  • As of 20.0 this container is available for both amd64 & arm64 architectures

Interactive APL Sessions

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.

Starting Your Application

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).

Automatic Application Startup

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:

  1. A single configuration file .dcfg. Note that the file must have a setting for the LX parameter if it is to start an application.
  2. A single source for a function .aplf, namespace .apln or class .aplc.
  3. A single Dyalog application file .dyapp (note that these are considered deprecated).
  4. A single Dyalog workspace .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).

ODBC Environment Variables

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.

VariableDescriptionDefault
SQL_DSNDSN Name$SQL_DATABASE
SQL_DATABASESQL Database Name
SQL_SERVERSQL Database Server IP or hostname
SQL_PORTTCP Port for ther Database Server3306
SQL_DRIVERSQL ODBC Driver to use (one of MySQL or MariaDB)MySQL
SQL_USERSQL Username to connect to the database
SQL_PASSWORDSQL Password to connect to the database

Extending the dyalog/techpreview Container

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.

Licence

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:

  • Commercial re-distribution of software that includes Dyalog requires a Run Time Licence. If you do not have a commercial licence, and you make images available for download, this constitutes acceptance of the default Run Time Licences, which allows non-commercial and limited commercial distribution.
  • If you create docker images which include Dyalog APL in addition to your own work and make them available for download, you must include the LICENSE file in a prominent location and include instructions which make reference to it.
Notes

*limited support - Dyalog does not offer standard support for this container, it is included for convenience and migration only.

Tag summary

Content type

Image

Digest

sha256:6444f7cce

Size

230.3 MB

Last updated

1 day ago

docker pull dyalog/techpreview