Skip to content

Commit

Permalink
Added new documentation.
Browse files Browse the repository at this point in the history
  • Loading branch information
thospfuller committed Apr 17, 2020
1 parent 6004679 commit a7b4eb7
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 8 deletions.
52 changes: 45 additions & 7 deletions DOCKER_EXAMPLE.md
Original file line number Diff line number Diff line change
@@ -1,16 +1,44 @@
If you're looking to load COBOL data files into the R Project for Statistical Computing then you came to the right place.
# Docker Examples

In this video we will demonstrate the open-source R COBOL Data Integration package running in Docker.
## Use the RCOBOLDI RStudio image on DockerHub

The Dockerfile in this example is based on Rocker / RStudio and will be running locally on port 8787.
[The RCOBOLDI Rocker/RStudio image is available on DockerHub here.](https://hub.docker.com/repository/docker/thospfuller/rcoboldi-rocker-rstudio/general)

# YouTube
The following is a fully working example.

Below is a video which demonstrates the R COBOL Data Integration package running in Docker.
## From the command line:

<a href="http://www.youtube.com/watch?feature=player_embedded&v=rBIrvUA788M" target="_blank"><img src="images/Introduction_To_RCOBOLDI_Data_Integration_Package_Static_Movie_Image.png" alt="Introduction To RCOBOLDI Data Integration Package" width="240" height="180" border="10" /></a>
```docker pull thospfuller/rcoboldi-rocker-rstudio:latest```

or

```docker pull thospfuller/rcoboldi-rocker-rstudio:1.0.2```

then

```docker image ls```

# R Script Example
should show something like this:

> REPOSITORY TAG IMAGE ID CREATED SIZE
> thospfuller/rcoboldi-rocker-rstudio 1.0.2 3f8c1c269940 37 minutes ago 2.42GB
then

```docker run -d -p 8787:8787 -e PASSWORD=password --name rstudio -i -t 3f8c1c269940```

## From the browser:

The next step is to test this in R so point your browser to [http://localhost:8787](http://localhost:8787) and use "rstudio" and "password" to login and then execute the following:

```
library(RCOBOLDI)
RCOBOLDI::Initialize()
result <- RCOBOLDI::ReadCopyBookAsDataFrame("/home/rstudio/rcoboldi/java/rcoboldi-core/src/test/resources/example1/DTAR020.cbl", "/home/rstudio/rcoboldi/java/rcoboldi-core/src/test/resources/example1/DTAR020.bin", "Fixed Length Binary", "cp037")
head(result)
```

## Build the RCOBOLDI RStudio Docker Image Locally

Step 1.) Build the image (this can take up to 20 minutes).

Expand Down Expand Up @@ -48,3 +76,13 @@ head(result)
```

![An example of the R COBOL Data Integration Package loading a file with the inputFileStructure set to "Fixed Length Binary" and the font set to "cp037". This should work out-of-the-box with a container built from the rcoboldi:rocker-rstudio image."](images/RCOBOLDI-RockerRStudio.png "An example of the R COBOL Data Integration Package loading a file with the inputFileStructure set to 'Fixed Length Binary' and the font set to 'cp037'. This should work out-of-the-box with a container built from the rcoboldi:rocker-rstudio image.")

## YouTube

If you're looking to load COBOL data files into the R Project for Statistical Computing then you came to the right place.

The Dockerfile in this example is based on Rocker / RStudio and will be running locally on port 8787.

Below is a video which demonstrates the R COBOL Data Integration package running in Docker.

<a href="http://www.youtube.com/watch?feature=player_embedded&v=rBIrvUA788M" target="_blank"><img src="images/Introduction_To_RCOBOLDI_Data_Integration_Package_Static_Movie_Image.png" alt="Introduction To RCOBOLDI Data Integration Package" width="240" height="180" border="10" /></a>
6 changes: 5 additions & 1 deletion docker/rocker/rstudio/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ The following is a fully working example.

## From the command line:

```docker pull thospfuller/rcoboldi-rocker-rstudio:latest```

or

```docker pull thospfuller/rcoboldi-rocker-rstudio:1.0.2```

then
Expand All @@ -32,4 +36,4 @@ library(RCOBOLDI)
RCOBOLDI::Initialize()
result <- RCOBOLDI::ReadCopyBookAsDataFrame("/home/rstudio/rcoboldi/java/rcoboldi-core/src/test/resources/example1/DTAR020.cbl", "/home/rstudio/rcoboldi/java/rcoboldi-core/src/test/resources/example1/DTAR020.bin", "Fixed Length Binary", "cp037")
head(result)
```
```

0 comments on commit a7b4eb7

Please sign in to comment.