Fwd: Re: Docker images for NetRexx

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

Fwd: Re: Docker images for NetRexx

Terry Fuller
-------- Forwarded Message --------
Subject: Re: [Ibm-netrexx] Docker images for NetRexx
Date: Wed, 29 Aug 2018 12:10:08 -0700
From: taf [hidden email]
To: IBM Netrexx [hidden email]


Well, old age catching up...

5d9b67811e94# nrc -verbose2 ../examples/ibm-historic/qtime.nrx
NetRexx portable processor 3.07-BETA build 447-20180803-1523
Copyright (c) RexxLA, 2011,2018.   All rights reserved.
Parts Copyright (c) IBM Corporation, 1995,2008.
Program qtime.nrx
    function tell
Compilation of 'qtime.nrx' successful
5d9b67811e94# ls -al
total 12
drwxr-xr-x  2 root root   60 Aug 29 18:49 .
drwxr-xr-x 40 root root 4096 Aug 29 18:33 ..
-rw-r--r--  1 root root 4833 Aug 29 18:58 qtime.class
5d9b67811e94# java qtime.class
5d9b67811e94# java qtime.class
Error: Could not find or load main class qtime.class
But, but it's right there! What am I missing? Need to be marked executable? And I remember that might need to be done, but cannot remember the #$%$#%^ command to do it...

On 2018-08-29 04:31, René Jansen wrote:

Skip to end of metadataDear 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: Fwd: Re: Docker images for NetRexx

Jason Martin

do not add .class

and make sure you are in dir where the your class is


On 08/29/18 03:22 PM, Terry Fuller wrote:
-------- Forwarded Message --------
Subject: Re: [Ibm-netrexx] Docker images for NetRexx
Date: Wed, 29 Aug 2018 12:10:08 -0700
From: taf [hidden email]
To: IBM Netrexx [hidden email]


Well, old age catching up...

5d9b67811e94# nrc -verbose2 ../examples/ibm-historic/qtime.nrx
NetRexx portable processor 3.07-BETA build 447-20180803-1523
Copyright (c) RexxLA, 2011,2018.   All rights reserved.
Parts Copyright (c) IBM Corporation, 1995,2008.
Program qtime.nrx
    function tell
Compilation of 'qtime.nrx' successful
5d9b67811e94# ls -al
total 12
drwxr-xr-x  2 root root   60 Aug 29 18:49 .
drwxr-xr-x 40 root root 4096 Aug 29 18:33 ..
-rw-r--r--  1 root root 4833 Aug 29 18:58 qtime.class
5d9b67811e94# java qtime.class
5d9b67811e94# java qtime.class
Error: Could not find or load main class qtime.class
But, but it's right there! What am I missing? Need to be marked executable? And I remember that might need to be done, but cannot remember the #$%$#%^ command to do it...

On 2018-08-29 04:31, René Jansen wrote:

Skip to end of metadataDear 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: Fwd: Re: Docker images for NetRexx

rvjansen
Yep, thats it. Thank you so much for trying. I did not get around using it on windows yet. Looks promising! And, yes, they should leave other stuff alone.

Best regards,

René.

On 29 Aug 2018, at 21:31, Jason Martin <[hidden email]> wrote:

do not add .class

and make sure you are in dir where the your class is


On 08/29/18 03:22 PM, Terry Fuller wrote:
-------- Forwarded Message --------
Subject: Re: [Ibm-netrexx] Docker images for NetRexx
Date: Wed, 29 Aug 2018 12:10:08 -0700
From: taf [hidden email]
To: IBM Netrexx [hidden email]


Well, old age catching up...

5d9b67811e94# nrc -verbose2 ../examples/ibm-historic/qtime.nrx
NetRexx portable processor 3.07-BETA build 447-20180803-1523
Copyright (c) RexxLA, 2011,2018.   All rights reserved.
Parts Copyright (c) IBM Corporation, 1995,2008.
Program qtime.nrx
    function tell
Compilation of 'qtime.nrx' successful
5d9b67811e94# ls -al
total 12
drwxr-xr-x  2 root root   60 Aug 29 18:49 .
drwxr-xr-x 40 root root 4096 Aug 29 18:33 ..
-rw-r--r--  1 root root 4833 Aug 29 18:58 qtime.class
5d9b67811e94# java qtime.class
5d9b67811e94# java qtime.class
Error: Could not find or load main class qtime.class
But, but it's right there! What am I missing? Need to be marked executable? And I remember that might need to be done, but cannot remember the #$%$#%^ command to do it...

On 2018-08-29 04:31, René Jansen wrote:

Skip to end of metadataDear 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/