Skip to content

Commit b60ab54

Browse files
authored
Merge pull request watson-developer-cloud#680 from kingsodigie/master
Python SDK Dockerfile
2 parents 563200b + 909c094 commit b60ab54

File tree

2 files changed

+24
-0
lines changed

2 files changed

+24
-0
lines changed

docker/Dockerfile

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#Import Python Base Image(change version as needed)
2+
FROM python:3-slim
3+
4+
#Install the python SDK
5+
RUN pip install --upgrade ibm-watson>=3.2.0

docker/README.md

+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
## Docker
2+
You can use docker to test issues you have with the SDK.
3+
4+
1. Install docker
5+
- Mac: https://docs.docker.com/docker-for-mac/install/
6+
- Windows: https://docs.docker.com/docker-for-windows/install/
7+
1. Download the dockerfile for this SDK and edit as needed.
8+
- Change the python version as needed `FROM python:<your-version>`
9+
- For valid python base images on docker see https://hub.docker.com/_/python
10+
- Copy code/file that you wish to test into the dockerfile
11+
- Add line `COPY <src>... <dest>`
12+
- Set dockerfile to execute code file
13+
- Add line `CMD [ "<executable>" ]`
14+
15+
- For more information on dockerfile construction please visit https://docs.docker.com/engine/reference/builder/
16+
1. Build and run the docker image.
17+
- Navigate to docker file directory
18+
- To build the docker image run `docker build --tag=<your-tag> .`
19+
- To run the docker image run `docker run <your-tag>`

0 commit comments

Comments
 (0)