Skip to content

Commit 03c4fc6

Browse files
committed
feat(docker): created dockerfile for sdk
1 parent 5531bfc commit 03c4fc6

File tree

2 files changed

+47
-0
lines changed

2 files changed

+47
-0
lines changed

docker/Dockerfile

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
# Import .NET SDK base image (change version as needed)
2+
FROM mcr.microsoft.com/dotnet/core/sdk:2.2
3+
4+
#Set working directory to src
5+
WORKDIR /src
6+
7+
# Create new .net project (console project, change as needed)
8+
RUN dotnet new console
9+
10+
# Install SDK packages
11+
RUN dotnet add package IBM.Watson.SpeechToText.v1 --version 3.3.0 && \
12+
dotnet add package IBM.Cloud.SDK.Core --version 0.8.2 && \
13+
dotnet add package IBM.Watson.TextToSpeech.v1 --version 3.3.0 && \
14+
dotnet add package IBM.Watson.NaturalLanguageUnderstanding.v1 --version 3.3.0 && \
15+
dotnet add package IBM.Watson.VisualRecognition.v3 --version 3.3.0 && \
16+
dotnet add package IBM.Watson.NaturalLanguageClassifier.v1 --version 3.3.0 && \
17+
dotnet add package IBM.Watson.Discovery.v1 --version 3.3.0 && \
18+
dotnet add package IBM.Watson.LanguageTranslator.v3 --version 3.3.0 && \
19+
dotnet add package IBM.Watson.PersonalityInsights.v3 --version 3.3.0 && \
20+
dotnet add package IBM.Watson.ToneAnalyzer.v3 --version 3.3.0 && \
21+
dotnet add package IBM.Watson.CompareComply.v1 --version 3.3.0 && \
22+
dotnet add package IBM.Watson.Common --version 3.0.1 && \
23+
dotnet add package IBM.Watson.Assistant.v1 --version 3.3.0 && \
24+
dotnet add package IBM.Watson.Assistant.v2 --version 3.3.0

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 .net version as needed `FROM mcr.microsoft.com/dotnet/core/sdk:<your-version>`
10+
- For valid .net base images on docker see <https://hub.docker.com/_/microsoft-dotnet-core-sdk/>
11+
12+
- Copy code/project 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)