Skip to content

Commit a8237aa

Browse files
Ruby SDK Dockerfile (#72)
Ruby SDK Dockerfile Co-authored-by: Mamoon Raja <[email protected]>
2 parents 7f5c69c + 67aafe5 commit a8237aa

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

docker/Dockerfile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#Import Ruby base image(change version as needed)
2+
FROM ruby:2.6.3
3+
4+
#Install Ruby SDK
5+
RUN gem install ibm_watson

docker/README.md

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
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+
8+
2. Download the dockerfile for this SDK and edit as needed.
9+
- Change the ruby version as needed `FROM ruby:<your-version>`
10+
- For valid ruby base images on docker see <https://hub.docker.com/_/ruby>
11+
12+
- Copy code/file that you wish to test into the dockerfile
13+
- Add line `COPY <src>... <dest>`
14+
15+
- Set dockerfile to execute code file
16+
- Add line `CMD [ "<executable>" ]`
17+
18+
- For more information on dockerfile construction please visit <https://docs.docker.com/engine/reference/builder/>
19+
20+
3. Build and run the docker image.
21+
- Navigate to docker file directory
22+
- To build the docker image run `docker build --tag=<your-tag> .`
23+
- To run the docker image run `docker run <your-tag>`

0 commit comments

Comments
 (0)