Skip to content

Commit 06b2de5

Browse files
committed
Add simple Dockerfile example for running wscli
1 parent 586d9ad commit 06b2de5

1 file changed

Lines changed: 30 additions & 9 deletions

File tree

README.md

Lines changed: 30 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ always requires SMS one-time password per login session
2727
e.g. filesystem (with proper permissions) for automation and managemnt
2828
credentials used separately (`admin` account password and phone).
2929

30-
*To-Be-Done*: PGP keys can be used to sign file uploads (with `data`
30+
_To-Be-Done_: PGP keys can be used to sign file uploads (with `data`
3131
account) for authorization decisions, `n` of `m` signatures required
3232
scheme, if needed. These PGP keys are imported as `authorization`
3333
keys. Certificates and more precisely, their private keys, can be
@@ -50,6 +50,29 @@ only one set of bank certificates.
5050
> file for expiration, which makes using the command line client
5151
> easier.**
5252
53+
### Run wscli on Docker
54+
55+
You can run `wscli` through docker container.
56+
57+
Here is an example minimal `Dockerfile`.
58+
59+
```shell
60+
FROM php:5.6-zts-jessie
61+
RUN curl -LSs https://isecurefi.github.io/wscli-php/installer.php | php && \
62+
cp wscli.phar /usr/local/bin/wscli && \
63+
cp wscli.phar.pubkey /usr/local/bin/wscli.pubkey
64+
```
65+
66+
And commands to use it. It assumes that you have `~/.wscli/settings.yaml`
67+
configuration file properly setup. So, it runs the `wscli:latest` docker
68+
container and the `wscli` command in it that we just installed when we
69+
built the container.
70+
71+
```shell
72+
docker build -t wscli:latest .
73+
docker run -v ${HOME}/.wscli:/root/.wscli wscli wscli session login
74+
```
75+
5376
### Install wscli tool
5477

5578
You can install `wscli` with the following commands. The tool is a
@@ -76,11 +99,11 @@ $ sudo wscli --update
7699
$ sudo wscli --rollback
77100
```
78101

79-
> *NOTE: The `wscli` itself is distributed as PHAR file. PHP was
102+
> _NOTE: The `wscli` itself is distributed as PHAR file. PHP was
80103
> selected as the programming language to write beefed up SDK and
81104
> command line client as most of our clients use PHP on their
82105
> backends. Other languages are also supported on request (C#,
83-
> Javascript, Python, ..).*
106+
> Javascript, Python, ..)._
84107
85108
### Create configuration file
86109

@@ -105,7 +128,6 @@ settings:
105128

106129
Note that the session information is not shown in the example above.
107130

108-
109131
## WSCLI SDK for PHP
110132

111133
`wscli` uses WSCLI SDK for PHP that is based on OpenAPI 2.0 generated
@@ -127,11 +149,11 @@ $ wscli session login
127149
$ wscli files listFiles --bank=nordea --status=ALL --filetype=KTL
128150
```
129151

130-
NOTE: *On the other parts than `account` and `session` the SDK is basically
152+
NOTE: _On the other parts than `account` and `session` the SDK is basically
131153
on the same level OpenAPI 2.0 generated SDK. However, on the `files` API,
132154
the SDK adds support for downloading set of files similar to the
133155
listing files API. It just downloads file one by one using the
134-
corresponding `downloadFile` API and by first calling `listFiles`.*
156+
corresponding `downloadFile` API and by first calling `listFiles`._
135157

136158
### Download WSCLI SDK for PHP
137159

@@ -144,8 +166,7 @@ description are available online. See also
144166
[wscli-php pages](https://isecurefi.github.io/wscli-php/).
145167

146168
- `wscli-php-sdk` includes beefed up OpenAPI 2.0 generated ISECure
147-
WS-Channel API client SDK to ease integration with PHP
169+
WS-Channel API client SDK to ease integration with PHP
148170

149171
- Command line tool `wscli` uses `wscli-php-sdk` and is distributed as
150-
single file PHAR.
151-
172+
single file PHAR.

0 commit comments

Comments
 (0)