Docker images for NetRexx

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Docker images for NetRexx

rvjansen

Skip to end of metadata
Dear NetRexx users,

Docker is a container technology. It is available for Mac, Windows and Linux. Information can be found at http://docker.com. The Community Edition can be used free of charge. In short, a container is combined from several images and runs a Linux distribution that is mapped (or emulated) to calls for the host OS.

Starting with 3.07, docker images will be available for NetRexx. This has several advantages:

  • New releases can be tested without impacting the current installation of NetRexx
  • Easy testing on multiple JDK / JRE versions (Oracle, Open JDK, IBM J9, etc)
  • No JDK or JRE is required on your desktop / laptop / work machine to develop and run NetRexx programs
  • No installation of NetRexx and its required path and classpath 
  • An image is delivered with a Java version that is tested with the NetRexx release - so it is known to work
  • The eclipse batch compiler will not be required
  • NetRexx, its batchfiles and its classpath will be setup already
  • When your app needs native calls, only one version needs to be produced and maintained
  • We hope to avoid all installation problems going forward
  • It will insulate against incompatible JVM changes where NetRexx development needs to catch up
  • It will be the start of a distribution mechanism for NetRexx applications cq. libraries

Two ways of using the image are foreseen:

  1. A shell within the image
  2. Working with a bind mounted directory in the shell of your local machine

1) Work with a shell within the image

As producing data within the image generally is not recommended this also involves a bind-mounted directory, but you will work inside of the shell in the docker container and you can use all the tools provided in the image. 

A suitable command line would be:

docker run --rm -it -v "$PWD":/nrx -w /nrx rvjansen/netrexx:3.07 zsh

If you want to keep changes in the container (for example, when you added tools or configuration that are useful and need to go into a new image, based on this image), do not use the --rm switch. The docker documentation explains how to commit this container and tag its new image. 

The -it switcher are needed for an interactive terminal session. the -v switch bind mounts the current directory into a directory /nrx in the image. You can find the files from your host OS (most of the time your source code) in the /nrx directory within the container. 


Next is the name of the image. The rvjansen/netrexx:3.07 will be downloaded once from the docker hub, when it is not on the local machine yet. Docker will know it has been downloaded the next time you start this image. Also, it will detect when the image has been updated.

zsh is the name of the shell to start. You could also start sh or bash. The example image is built on debian and OpenJDK 8.

The available tools within the image are being worked on, and documentation will be produced later. (Note: do not substitute your own userid for ‘rvjansen’ - that would be needed most of the time in examples, but this time it is in a (public) docker hub repository called rvjansen - we will make this a bit more ‘official’ going forward).

2) Compile or exec from a shell on your host machine

The term 'host machine' is used here to indicate the fact that the docker image runs a guest OS. 

A suitable command line would be: (assuming you want to compile a class called RSAnrx in the local directory)

docker run --rm -v "$PWD":/nrx -w /nrx rvjansen/netrexx:3.07 nrc RSAnrx

Here, --rm will make sure the container is not kept, the -v tells docker to bind mount the current directory to a directory /nrx within the container, and -w sets this as the working directory. The rvjansen/netrexx:3.07 will be downloaded once from the docker hub, when it is not on the local machine yet. It will know it has been downloaded the next time you start this image. Of course, in most shells is it possible to alias this command, or start a batchfile, c.q. a shell script containing this.

The docker images will be updated from time to time, but the basic workings will stay the same.


I would appreciate it very much if someone could test this with docker for windows. 

best regards,

René Jansen.

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Docker images for NetRexx

Rony G. Flatscher
*Very* interesting and impressive! 

Do you think creating a dicker image with ooRexx, BSF4ooRexx and OpenJDK would be something to pursue?

—-rony

Rony G. Flatscher (mobil/e)

Am 29.08.2018 um 13:31 schrieb René Jansen <[hidden email]>:


Skip to end of metadata
Dear NetRexx users,

Docker is a container technology. It is available for Mac, Windows and Linux. Information can be found at http://docker.com. The Community Edition can be used free of charge. In short, a container is combined from several images and runs a Linux distribution that is mapped (or emulated) to calls for the host OS.

Starting with 3.07, docker images will be available for NetRexx. This has several advantages:

  • New releases can be tested without impacting the current installation of NetRexx
  • Easy testing on multiple JDK / JRE versions (Oracle, Open JDK, IBM J9, etc)
  • No JDK or JRE is required on your desktop / laptop / work machine to develop and run NetRexx programs
  • No installation of NetRexx and its required path and classpath 
  • An image is delivered with a Java version that is tested with the NetRexx release - so it is known to work
  • The eclipse batch compiler will not be required
  • NetRexx, its batchfiles and its classpath will be setup already
  • When your app needs native calls, only one version needs to be produced and maintained
  • We hope to avoid all installation problems going forward
  • It will insulate against incompatible JVM changes where NetRexx development needs to catch up
  • It will be the start of a distribution mechanism for NetRexx applications cq. libraries

Two ways of using the image are foreseen:

  1. A shell within the image
  2. Working with a bind mounted directory in the shell of your local machine

1) Work with a shell within the image

As producing data within the image generally is not recommended this also involves a bind-mounted directory, but you will work inside of the shell in the docker container and you can use all the tools provided in the image. 

A suitable command line would be:

docker run --rm -it -v "$PWD":/nrx -w /nrx rvjansen/netrexx:3.07 zsh

If you want to keep changes in the container (for example, when you added tools or configuration that are useful and need to go into a new image, based on this image), do not use the --rm switch. The docker documentation explains how to commit this container and tag its new image. 

The -it switcher are needed for an interactive terminal session. the -v switch bind mounts the current directory into a directory /nrx in the image. You can find the files from your host OS (most of the time your source code) in the /nrx directory within the container. 


Next is the name of the image. The rvjansen/netrexx:3.07 will be downloaded once from the docker hub, when it is not on the local machine yet. Docker will know it has been downloaded the next time you start this image. Also, it will detect when the image has been updated.

zsh is the name of the shell to start. You could also start sh or bash. The example image is built on debian and OpenJDK 8.

The available tools within the image are being worked on, and documentation will be produced later. (Note: do not substitute your own userid for ‘rvjansen’ - that would be needed most of the time in examples, but this time it is in a (public) docker hub repository called rvjansen - we will make this a bit more ‘official’ going forward).

2) Compile or exec from a shell on your host machine

The term 'host machine' is used here to indicate the fact that the docker image runs a guest OS. 

A suitable command line would be: (assuming you want to compile a class called RSAnrx in the local directory)

docker run --rm -v "$PWD":/nrx -w /nrx rvjansen/netrexx:3.07 nrc RSAnrx

Here, --rm will make sure the container is not kept, the -v tells docker to bind mount the current directory to a directory /nrx within the container, and -w sets this as the working directory. The rvjansen/netrexx:3.07 will be downloaded once from the docker hub, when it is not on the local machine yet. It will know it has been downloaded the next time you start this image. Of course, in most shells is it possible to alias this command, or start a batchfile, c.q. a shell script containing this.

The docker images will be updated from time to time, but the basic workings will stay the same.


I would appreciate it very much if someone could test this with docker for windows. 

best regards,

René Jansen.
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

Reply | Threaded
Open this post in threaded view
|

Re: Docker images for NetRexx

rvjansen
Hi Rony,

Yes, that is next in line.

Best regards,

René.

On 29 Aug 2018, at 16:08, Rony <[hidden email]> wrote:

*Very* interesting and impressive! 

Do you think creating a dicker image with ooRexx, BSF4ooRexx and OpenJDK would be something to pursue?

—-rony

Rony G. Flatscher (mobil/e)

Am 29.08.2018 um 13:31 schrieb René Jansen <[hidden email]>:


Skip to end of metadata
Dear NetRexx users,

Docker is a container technology. It is available for Mac, Windows and Linux. Information can be found at http://docker.com. The Community Edition can be used free of charge. In short, a container is combined from several images and runs a Linux distribution that is mapped (or emulated) to calls for the host OS.

Starting with 3.07, docker images will be available for NetRexx. This has several advantages:

  • New releases can be tested without impacting the current installation of NetRexx
  • Easy testing on multiple JDK / JRE versions (Oracle, Open JDK, IBM J9, etc)
  • No JDK or JRE is required on your desktop / laptop / work machine to develop and run NetRexx programs
  • No installation of NetRexx and its required path and classpath 
  • An image is delivered with a Java version that is tested with the NetRexx release - so it is known to work
  • The eclipse batch compiler will not be required
  • NetRexx, its batchfiles and its classpath will be setup already
  • When your app needs native calls, only one version needs to be produced and maintained
  • We hope to avoid all installation problems going forward
  • It will insulate against incompatible JVM changes where NetRexx development needs to catch up
  • It will be the start of a distribution mechanism for NetRexx applications cq. libraries

Two ways of using the image are foreseen:

  1. A shell within the image
  2. Working with a bind mounted directory in the shell of your local machine

1) Work with a shell within the image

As producing data within the image generally is not recommended this also involves a bind-mounted directory, but you will work inside of the shell in the docker container and you can use all the tools provided in the image. 

A suitable command line would be:

docker run --rm -it -v "$PWD":/nrx -w /nrx rvjansen/netrexx:3.07 zsh

If you want to keep changes in the container (for example, when you added tools or configuration that are useful and need to go into a new image, based on this image), do not use the --rm switch. The docker documentation explains how to commit this container and tag its new image. 

The -it switcher are needed for an interactive terminal session. the -v switch bind mounts the current directory into a directory /nrx in the image. You can find the files from your host OS (most of the time your source code) in the /nrx directory within the container. 


Next is the name of the image. The rvjansen/netrexx:3.07 will be downloaded once from the docker hub, when it is not on the local machine yet. Docker will know it has been downloaded the next time you start this image. Also, it will detect when the image has been updated.

zsh is the name of the shell to start. You could also start sh or bash. The example image is built on debian and OpenJDK 8.

The available tools within the image are being worked on, and documentation will be produced later. (Note: do not substitute your own userid for ‘rvjansen’ - that would be needed most of the time in examples, but this time it is in a (public) docker hub repository called rvjansen - we will make this a bit more ‘official’ going forward).

2) Compile or exec from a shell on your host machine

The term 'host machine' is used here to indicate the fact that the docker image runs a guest OS. 

A suitable command line would be: (assuming you want to compile a class called RSAnrx in the local directory)

docker run --rm -v "$PWD":/nrx -w /nrx rvjansen/netrexx:3.07 nrc RSAnrx

Here, --rm will make sure the container is not kept, the -v tells docker to bind mount the current directory to a directory /nrx within the container, and -w sets this as the working directory. The rvjansen/netrexx:3.07 will be downloaded once from the docker hub, when it is not on the local machine yet. It will know it has been downloaded the next time you start this image. Of course, in most shells is it possible to alias this command, or start a batchfile, c.q. a shell script containing this.

The docker images will be updated from time to time, but the basic workings will stay the same.


I would appreciate it very much if someone could test this with docker for windows. 

best regards,

René Jansen.
_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/

_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/


_______________________________________________
Ibm-netrexx mailing list
[hidden email]
Online Archive : http://ibm-netrexx.215625.n3.nabble.com/