Skip to content

Commit 2c3bf55

Browse files
committed
update docker support
1 parent 69b12a3 commit 2c3bf55

File tree

3 files changed

+10
-10
lines changed

3 files changed

+10
-10
lines changed

.dockerignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
11
notebook/
22
.vscode
33
mrn_python
4-
.gitignore
4+
.gitignore
5+
.env
6+
.env.example

Dockerfile

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,18 @@
11
#Build stage
2-
FROM python:3.8-alpine3.14 AS builder
2+
FROM python:3.8.12-alpine3.15 AS builder
33

4-
LABEL maintainer="Wasin Waeosri <wasin.waeosri@rifinitiv.com>"
4+
LABEL maintainer="Wasin Waeosri <wasin.waeosri@lseg.com>"
55

66
# Install gcc + musl-dev
7-
RUN apk add --no-cache gcc musl-dev
7+
RUN apk update && apk add --no-cache build-base gcc musl-dev
88
#Copy requirements.txt
99
COPY requirements.txt .
1010

1111
# install dependencies to the local user directory (eg. /root/.local)
1212
RUN pip install --user -r requirements.txt
1313

1414
# Run stage
15-
#FROM python:3.8.11-alpine
16-
FROM python:3.8.11-alpine3.14
15+
FROM python:3.8.12-alpine3.15
1716
WORKDIR /app
1817

1918
# Update PATH environment variable + set Python buffer to make Docker print every message instantly.

README.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,7 @@ Please see the full documentation of this example application in [this article](
1212

1313
*Note:* The news message is in UTF-8 JSON string format. Some news messages that contain special Unicode character may not be able to show in Windows OS console (cmd, git bash, powershell, etc) due to the OS limitation. Those messages will be print as ```UnicodeEncodeError exception. Cannot decode Unicode character``` message in a console instead.
1414

15-
16-
**Update (As of December 2021)**: The example now supports the Refinitiv Real-Time -- Optimized (RTO - formerly known as ERT in Cloud) connection. You do not need to switch to the [ERT-in-Cloud](https://github.com/Refinitiv-API-Samples/Example.WebSocketAPI.Python.MRN/tree/ERT-in-Cloud) branch anymore.
15+
**Update (As of December 2021)**: The Main/Master branch now supports the Refinitiv Real-Time -- Optimized (RTO - formerly known as ERT in Cloud) connection. You do not need to switch to the [ERT-in-Cloud](https://github.com/Refinitiv-API-Samples/Example.WebSocketAPI.Python.MRN/tree/ERT-in-Cloud) branch anymore.
1716
* The RTO console example: Please check my colleague's [Refinitiv-API-Samples/Example.WebSocketAPI.Python.MRN.RTO](https://github.com/Refinitiv-API-Samples/Example.WebSocketAPI.Python.MRN.RTO) GitHub Repository.
1817
* The RTO notebook example: mrn_notebook_app_rto.ipynb notebook file.
1918
- Special thanks to Neeranat Junsuriyawong from the Solutions Consultant team for the contribution to this RTO notebook example.
@@ -171,15 +170,15 @@ Please check my colleague's [Refinitiv-API-Samples/Example.WebSocketAPI.Python.M
171170
Alternatively, the *mrn_trna_console_rto.py* example of the [Refinitiv-API-Samples/Example.WebSocketAPI.Python.TRNA](https://github.com/Refinitiv-API-Samples/Example.WebSocketAPI.Python.TRNA) project also supports the MRN consumer with RTO, but it subscribes to ```MRN_TRNA``` RIC code from the RTO by default.
172171

173172

174-
### Docker example
173+
### <a id="rtds_console_docker"></a>Bonus: RTDS console Docker example
175174
1. Go to the project folder in the console
176175
2. Run ```$> docker build -t <project tag name> .``` command in a console to build an image from a Dockerfile.
177176
```
178177
$> docker build -t rtsdk_ws_mrn_python .
179178
```
180179
3. Once the build is a success, you can create and run the container with the following command
181180
```
182-
$> docker run --name mrn_console -it rtsdk_ws_mrn_python --hostname Real-Time Advanced Distribution Server IP Address/Hostname> --port <WebSocket Port> --ric <MRN RIC name>
181+
$> docker run --name mrn_console -it rtsdk_ws_mrn_python --hostname <Real-Time Advanced Distribution Server IP Address/Hostname> --port <WebSocket Port> --ric <MRN RIC name>
183182
```
184183
4. If you want to connect the Docker container to a localhost, please use ```host.docker.internal``` as the Host name.
185184
5. Press Ctrl+C buttons to stop the application

0 commit comments

Comments
 (0)