Skip to content

Commit

Permalink
updated docker commands
Browse files Browse the repository at this point in the history
  • Loading branch information
jnnngs committed Jun 19, 2024
1 parent 31a40d6 commit 6505cda
Show file tree
Hide file tree
Showing 4 changed files with 98 additions and 21 deletions.
10 changes: 6 additions & 4 deletions docs/advanced-features.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

## Advanced Features

### API Mode
Expand All @@ -22,7 +23,7 @@ http://localhost:8080/api/execute
```

Body:
```bash
```json
{
"Host": "10.27.27.27",
"Port": 3270,
Expand Down Expand Up @@ -79,13 +80,14 @@ To run `3270Connect` in API mode, use the following command:

#### Linux
```bash
docker run --rm 3270io/3270connect-linux:latest -api -api-port 8080
docker run --rm -p 8080:8080 3270io/3270connect-linux:latest -api -api-port 8080
```

#### Windows
```bash
docker run --rm 3270io/3270connect-windows:latest -api -api-port 8080
docker run --rm -p 8080:8080 3270io/3270connect-windows:latest -api -api-port 8080
```

### 3270Connect API Usage

![type:video](3270Connect_API_1_0_4_0.mp4){: style=''}
![type:video](3270Connect_API_1_0_4_0.mp4){: style=''}
27 changes: 14 additions & 13 deletions docs/basic-usage.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Basic Usage

## Introduction
Expand Down Expand Up @@ -176,37 +177,37 @@ docker pull 3270io/3270connect-linux:latest
Run the container with a configuration file:

```bash
docker run -it -v $(pwd)/workflow.json:/app/workflow.json 3270io/3270connect-linux:latest -config /app/workflow.json
docker run -it -v $(pwd)/workflow.json:/app/workflow.json -v $(pwd)/output.html:/app/output.html -p 3270:3270 3270io/3270connect-linux:latest -config /app/workflow.json
```

Run in headless mode:

```bash
docker run -it -v $(pwd)/workflow.json:/app/workflow.json 3270io/3270connect-linux:latest -config /app/workflow.json -headless
docker run -it -v $(pwd)/workflow.json:/app/workflow.json -v $(pwd)/output.html:/app/output.html -p 3270:3270 3270io/3270connect-linux:latest -config /app/workflow.json -headless
```

Run in verbose mode:

```bash
docker run -it -v $(pwd)/workflow.json:/app/workflow.json 3270io/3270connect-linux:latest -config /app/workflow.json -verbose
docker run -it -v $(pwd)/workflow.json:/app/workflow.json -v $(pwd)/output.html:/app/output.html -p 3270:3270 3270io/3270connect-linux:latest -config /app/workflow.json -verbose
```

Run multiple workflows concurrently:

```bash
docker run -it -v $(pwd)/workflow.json:/app/workflow.json 3270io/3270connect-linux:latest -config /app/workflow.json -concurrent 2 -runtime 60
docker run -it -v $(pwd)/workflow.json:/app/workflow.json -v $(pwd)/output.html:/app/output.html -p 3270:3270 3270io/3270connect-linux:latest -config /app/workflow.json -concurrent 2 -runtime 60
```

Run a test 3270 sample application:

```bash
docker run -it 3270io/3270connect-linux:latest -runApp
docker run -it -p 3270:3270 3270io/3270connect-linux:latest -runApp
```

Run a specific test 3270 sample application:

```bash
docker run -it 3270io/3270connect-linux:latest -runApp [number]
docker run -it -p 3270:3270 3270io/3270connect-linux:latest -runApp [number]
```

### Windows
Expand All @@ -220,37 +221,37 @@ docker pull 3270io/3270connect-windows:latest
Run the container with a configuration file:

```bash
docker run -it -v ${PWD}/workflow.json:/app/workflow.json 3270io/3270connect-windows:latest -config /app/workflow.json
docker run -it -v ${PWD}/workflow.json:/app/workflow.json -v ${PWD}/output.html:/app/output.html -p 3270:3270 3270io/3270connect-windows:latest -config /app/workflow.json
```

Run in headless mode:

```bash
docker run -it -v ${PWD}/workflow.json:/app/workflow.json 3270io/3270connect-windows:latest -config /app/workflow.json -headless
docker run -it -v ${PWD}/workflow.json:/app/workflow.json -v ${PWD}/output.html:/app/output.html -p 3270:3270 3270io/3270connect-windows:latest -config /app/workflow.json -headless
```

Run in verbose mode:

```bash
docker run -it -v ${PWD}/workflow.json:/app/workflow.json 3270io/3270connect-windows:latest -config /app/workflow.json -verbose
docker run -it -v ${PWD}/workflow.json:/app/workflow.json -v ${PWD}/output.html:/app/output.html -p 3270:3270 3270io/3270connect-windows:latest -config /app/workflow.json -verbose
```

Run multiple workflows concurrently:

```bash
docker run -it -v ${PWD}/workflow.json:/app/workflow.json 3270io/3270connect-windows:latest -config /app/workflow.json -concurrent 2 -runtime 60
docker run -it -v ${PWD}/workflow.json:/app/workflow.json -v ${PWD}/output.html:/app/output.html -p 3270:3270 3270io/3270connect-windows:latest -config /app/workflow.json -concurrent 2 -runtime 60
```

Run a test 3270 sample application:

```bash
docker run -it 3270io/3270connect-windows:latest -runApp
docker run -it -p 3270:3270 3270io/3270connect-windows:latest -runApp
```

Run a specific test 3270 sample application:

```bash
docker run -it 3270io/3270connect-windows:latest -runApp [number]
docker run -it -p 3270:3270 3270io/3270connect-windows:latest -runApp [number]
```

### 3270Connect Basic Usage
Expand All @@ -261,4 +262,4 @@ docker run -it 3270io/3270connect-windows:latest -runApp [number]

The `3270Connect` command-line utility offers a flexible way to automate interactions with terminal emulators. Whether you need to connect to hosts, manipulate screens, or run multiple workflows concurrently, `3270Connect` has you covered. Explore its features, experiment with different workflows, and streamline your terminal automation tasks.

That's it! You're now ready to use `3270Connect` for your terminal automation needs, including the API mode for more advanced automation scenarios.
That's it! You're now ready to use `3270Connect` for your terminal automation needs, including the API mode for more advanced automation scenarios.
2 changes: 0 additions & 2 deletions docs/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,6 @@ Once you've mastered the basics, you can dive into more advanced features:

- [API Mode](advanced-features.md): Discover how to run 3270Connect as an API server for advanced automation and load performance testing.

### UPDATE: Version 1.0.6 now has Windows support

## Conclusion

The 3270Connect command-line utility is a powerful tool for automating terminal emulator interactions. This documentation is here to help you make the most of it. If you have any questions or need assistance, feel free to reach out to the community or refer to the [GitHub repository](https://github.com/3270io/3270Connect) for more details.
Expand Down
80 changes: 78 additions & 2 deletions docs/installation.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@

# Installation

To use the 3270Connect command-line utility, you need to install it on your system. Follow the steps below based on your platform:
Expand All @@ -8,8 +9,7 @@ To use the 3270Connect command-line utility, you need to install it on your syst

```shell
# Fetch the latest release URL
LATEST_URL=$(curl -s https://api.github.com/repos/3270io/3270Connect/releases/latest \
| jq -r '.assets[] | select(.name == "3270Connect") | .browser_download_url')
LATEST_URL=$(curl -s https://api.github.com/repos/3270io/3270Connect/releases/latest | jq -r '.assets[] | select(.name == "3270Connect") | .browser_download_url')

# Download the latest release
curl -LO $LATEST_URL
Expand All @@ -31,6 +31,44 @@ docker pull 3270io/3270connect-linux:latest
docker run --rm -it 3270io/3270connect-linux:latest
```

#### Additional Docker Run Examples (Linux)

Run the container with a configuration file and expose the port:

```shell
docker run -it -v $(pwd)/workflow.json:/app/workflow.json -v $(pwd)/output.html:/app/output.html -p 3270:3270 3270io/3270connect-linux:latest -config /app/workflow.json
```

Run in headless mode:

```shell
docker run -it -v $(pwd)/workflow.json:/app/workflow.json -v $(pwd)/output.html:/app/output.html -p 3270:3270 3270io/3270connect-linux:latest -config /app/workflow.json -headless
```

Run in verbose mode:

```shell
docker run -it -v $(pwd)/workflow.json:/app/workflow.json -v $(pwd)/output.html:/app/output.html -p 3270:3270 3270io/3270connect-linux:latest -config /app/workflow.json -verbose
```

Run multiple workflows concurrently:

```shell
docker run -it -v $(pwd)/workflow.json:/app/workflow.json -v $(pwd)/output.html:/app/output.html -p 3270:3270 3270io/3270connect-linux:latest -config /app/workflow.json -concurrent 2 -runtime 60
```

Run a test 3270 sample application:

```shell
docker run -it -p 3270:3270 3270io/3270connect-linux:latest -runApp
```

Run a specific test 3270 sample application:

```shell
docker run -it -p 3270:3270 3270io/3270connect-linux:latest -runApp [number]
```

## Windows

### Direct Installation
Expand Down Expand Up @@ -58,3 +96,41 @@ docker pull 3270io/3270connect-windows:latest
# Run the Docker container
docker run --rm -it 3270io/3270connect-windows:latest
```

#### Additional Docker Run Examples (Windows)

Run the container with a configuration file and expose the port:

```shell
docker run -it -v ${PWD}/workflow.json:/app/workflow.json -v ${PWD}/output.html:/app/output.html -p 3270:3270 3270io/3270connect-windows:latest -config /app/workflow.json
```

Run in headless mode:

```shell
docker run -it -v ${PWD}/workflow.json:/app/workflow.json -v ${PWD}/output.html:/app/output.html -p 3270:3270 3270io/3270connect-windows:latest -config /app/workflow.json -headless
```

Run in verbose mode:

```shell
docker run -it -v ${PWD}/workflow.json:/app/workflow.json -v ${PWD}/output.html:/app/output.html -p 3270:3270 3270io/3270connect-windows:latest -config /app/workflow.json -verbose
```

Run multiple workflows concurrently:

```shell
docker run -it -v ${PWD}/workflow.json:/app/workflow.json -v ${PWD}/output.html:/app/output.html -p 3270:3270 3270io/3270connect-windows:latest -config /app/workflow.json -concurrent 2 -runtime 60
```

Run a test 3270 sample application:

```shell
docker run -it -p 3270:3270 3270io/3270connect-windows:latest -runApp
```

Run a specific test 3270 sample application:

```shell
docker run -it -p 3270:3270 3270io/3270connect-windows:latest -runApp [number]
```

0 comments on commit 6505cda

Please sign in to comment.