30 lines
585 B
Markdown
30 lines
585 B
Markdown
# HelloWorld .NET with Jenkins and Docker
|
|
|
|
This repository contains:
|
|
|
|
- `HelloWorldApp` - .NET 10 console app
|
|
- `HelloWorldApp.Tests` - xUnit tests
|
|
- `Jenkinsfile` - Jenkins pipeline to build, test, containerize and push image
|
|
- `HelloWorldApp/Dockerfile` - multi-stage .NET Docker build
|
|
|
|
## Local build + test
|
|
|
|
```bash
|
|
dotnet test HelloWorld.slnx
|
|
```
|
|
|
|
## Build Docker image locally
|
|
|
|
```bash
|
|
cd HelloWorldApp
|
|
docker build -t your-registry.example.com/helloworldapp:latest .
|
|
```
|
|
|
|
## Run Docker image locally
|
|
|
|
```bash
|
|
docker run --rm your-registry.example.com/helloworldapp:latest
|
|
```
|
|
|
|
|