Skip to content

Commit

Permalink
chore(examples): update update_examples.go to use new tags (#3849)
Browse files Browse the repository at this point in the history
* chore(examples): update update_examples.go to use new tags

* v0.9.4
  • Loading branch information
korniltsev authored Feb 5, 2025
1 parent 71187cc commit 2a310e1
Show file tree
Hide file tree
Showing 7 changed files with 12 additions and 12 deletions.
6 changes: 3 additions & 3 deletions docs/sources/configure-client/language-sdks/dotnet.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,13 +45,13 @@ The Pyroscope server can be a local server for development or a remote server fo
1. Obtain `Pyroscope.Profiler.Native.so` and `Pyroscope.Linux.ApiWrapper.x64.so` from the [latest tarball](https://github.com/pyroscope-io/pyroscope-dotnet/releases/):

```bash
curl -s -L https://github.com/grafana/pyroscope-dotnet/releases/download/v0.9.2-pyroscope/pyroscope.0.9.2-glibc-x86_64.tar.gz | tar xvz -C .
curl -s -L https://github.com/grafana/pyroscope-dotnet/releases/download/v0.9.4-pyroscope/pyroscope.0.9.4-glibc-x86_64.tar.gz | tar xvz -C .
```

Or copy them from the [latest docker image](https://hub.docker.com/r/pyroscope/pyroscope-dotnet/tags). We have `glibc` and `musl` versions:
```dockerfile
COPY --from=pyroscope/pyroscope-dotnet:0.9.2-glibc /Pyroscope.Profiler.Native.so ./Pyroscope.Profiler.Native.so
COPY --from=pyroscope/pyroscope-dotnet:0.9.2-glibc /Pyroscope.Linux.ApiWrapper.x64.so ./Pyroscope.Linux.ApiWrapper.x64.so
COPY --from=pyroscope/pyroscope-dotnet:0.9.4-glibc /Pyroscope.Profiler.Native.so ./Pyroscope.Profiler.Native.so
COPY --from=pyroscope/pyroscope-dotnet:0.9.4-glibc /Pyroscope.Linux.ApiWrapper.x64.so ./Pyroscope.Linux.ApiWrapper.x64.so
````

2. Set the following required environment variables to enable profiler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM mcr.microsoft.com/dotnet/sdk:6.0

WORKDIR /dotnet

COPY --from=pyroscope/pyroscope-dotnet:0.9.2-glibc /Pyroscope.Profiler.Native.so ./Pyroscope.Profiler.Native.so
COPY --from=pyroscope/pyroscope-dotnet:0.9.2-glibc /Pyroscope.Linux.ApiWrapper.x64.so ./Pyroscope.Linux.ApiWrapper.x64.so
COPY --from=pyroscope/pyroscope-dotnet:0.9.4-glibc /Pyroscope.Profiler.Native.so ./Pyroscope.Profiler.Native.so
COPY --from=pyroscope/pyroscope-dotnet:0.9.4-glibc /Pyroscope.Linux.ApiWrapper.x64.so ./Pyroscope.Linux.ApiWrapper.x64.so

ADD example .

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ FROM mcr.microsoft.com/dotnet/sdk:6.0-alpine

WORKDIR /dotnet

COPY --from=pyroscope/pyroscope-dotnet:0.9.2-musl /Pyroscope.Profiler.Native.so ./Pyroscope.Profiler.Native.so
COPY --from=pyroscope/pyroscope-dotnet:0.9.2-musl /Pyroscope.Linux.ApiWrapper.x64.so ./Pyroscope.Linux.ApiWrapper.x64.so
COPY --from=pyroscope/pyroscope-dotnet:0.9.4-musl /Pyroscope.Profiler.Native.so ./Pyroscope.Profiler.Native.so
COPY --from=pyroscope/pyroscope-dotnet:0.9.4-musl /Pyroscope.Linux.ApiWrapper.x64.so ./Pyroscope.Linux.ApiWrapper.x64.so

ADD example .

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN sed -i -E 's|<TargetFramework>.*</TargetFramework>|<TargetFramework>net'$SDK
RUN dotnet publish -o . --framework net$SDK_VERSION --runtime linux-x64 --no-self-contained

# This fetches the SDK
FROM --platform=linux/amd64 pyroscope/pyroscope-dotnet:0.9.2-glibc AS sdk
FROM --platform=linux/amd64 pyroscope/pyroscope-dotnet:0.9.4-glibc AS sdk

# Runtime only image of the targetplatfrom, so the platform the image will be running on.
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/aspnet:$SDK_VERSION
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ RUN sed -i -E 's|<TargetFramework>.*</TargetFramework>|<TargetFramework>net'$SDK
RUN dotnet publish -o . --framework net$SDK_VERSION --runtime linux-musl-x64 --no-self-contained

# This fetches the SDK
FROM --platform=linux/amd64 pyroscope/pyroscope-dotnet:0.9.2-musl AS sdk
FROM --platform=linux/amd64 pyroscope/pyroscope-dotnet:0.9.4-musl AS sdk

# Runtime only image of the targetplatfrom, so the platform the image will be running on.
FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/aspnet:$SDK_VERSION-alpine
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ FROM --platform=linux/amd64 mcr.microsoft.com/dotnet/sdk:6.0

WORKDIR /dotnet

COPY --from=pyroscope/pyroscope-dotnet:0.9.2-glibc /Pyroscope.Profiler.Native.so ./Pyroscope.Profiler.Native.so
COPY --from=pyroscope/pyroscope-dotnet:0.9.2-glibc /Pyroscope.Linux.ApiWrapper.x64.so ./Pyroscope.Linux.ApiWrapper.x64.so
COPY --from=pyroscope/pyroscope-dotnet:0.9.4-glibc /Pyroscope.Profiler.Native.so ./Pyroscope.Profiler.Native.so
COPY --from=pyroscope/pyroscope-dotnet:0.9.4-glibc /Pyroscope.Linux.ApiWrapper.x64.so ./Pyroscope.Linux.ApiWrapper.x64.so

ADD example .

Expand Down
2 changes: 1 addition & 1 deletion tools/update_examples.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,7 @@ func extractRSVersion(module string) func(tag Tag) *version {

func extractDotnetVersion() func(tag Tag) *version {
return func(tag Tag) *version {
re := regexp.MustCompile(`v(\d+).(\d+).(\d+)-pyroscope`)
re := regexp.MustCompile(`v(\d+).(\d+).(\d+)$`)
match := re.FindStringSubmatch(tag.Name)
if match != nil {
fmt.Println(len(match), match)
Expand Down

0 comments on commit 2a310e1

Please sign in to comment.