Skip to content

Commit 84e75c9

Browse files
Merge pull request #8 from SyncfusionExamples/WordToPDF_Cloud
Resolve dependabot errors for Word Library and Update Docker samples
2 parents 16eee36 + ff749af commit 84e75c9

File tree

15 files changed

+96
-48
lines changed

15 files changed

+96
-48
lines changed
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
<?xml version="1.0" encoding="utf-8" ?>
1+
<?xml version="1.0" encoding="utf-8"?>
22
<configuration>
33
<startup>
4-
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6" />
4+
<supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.6.2"/>
55
</startup>
6-
</configuration>
6+
</configuration>

AWS-Lambda/Console-App-.NET-Core/Console-App-.NET-Core/Console-App-.NET-Core.csproj

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,11 @@
88
<OutputType>Exe</OutputType>
99
<RootNamespace>Console-App-.NET-Core</RootNamespace>
1010
<AssemblyName>Console-App-.NET-Core</AssemblyName>
11-
<TargetFrameworkVersion>v4.6</TargetFrameworkVersion>
11+
<TargetFrameworkVersion>v4.6.2</TargetFrameworkVersion>
1212
<FileAlignment>512</FileAlignment>
1313
<AutoGenerateBindingRedirects>true</AutoGenerateBindingRedirects>
1414
<Deterministic>true</Deterministic>
15+
<TargetFrameworkProfile />
1516
</PropertyGroup>
1617
<PropertyGroup Condition=" '$(Configuration)|$(Platform)' == 'Debug|AnyCPU' ">
1718
<PlatformTarget>AnyCPU</PlatformTarget>
@@ -39,8 +40,8 @@
3940
<Reference Include="AWSSDK.Lambda, Version=3.3.0.0, Culture=neutral, PublicKeyToken=885c28607f98e604, processorArchitecture=MSIL">
4041
<HintPath>..\packages\AWSSDK.Lambda.3.3.102.25\lib\net45\AWSSDK.Lambda.dll</HintPath>
4142
</Reference>
42-
<Reference Include="Newtonsoft.Json, Version=12.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
43-
<HintPath>..\packages\Newtonsoft.Json.12.0.2\lib\net45\Newtonsoft.Json.dll</HintPath>
43+
<Reference Include="Newtonsoft.Json, Version=13.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
44+
<HintPath>..\packages\Newtonsoft.Json.13.0.1\lib\net45\Newtonsoft.Json.dll</HintPath>
4445
</Reference>
4546
<Reference Include="System" />
4647
<Reference Include="System.Core" />
Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0" encoding="utf-8"?>
22
<packages>
3-
<package id="AWSSDK.Core" version="3.3.103.7" targetFramework="net46" />
4-
<package id="AWSSDK.Lambda" version="3.3.102.25" targetFramework="net46" />
5-
<package id="Newtonsoft.Json" version="12.0.2" targetFramework="net46" />
3+
<package id="AWSSDK.Core" version="3.3.103.7" targetFramework="net462" />
4+
<package id="AWSSDK.Lambda" version="3.3.102.25" targetFramework="net462" />
5+
<package id="Newtonsoft.Json" version="13.0.1" targetFramework="net462" />
66
</packages>

Linux Docker/Alpine/WordToPDFDockerSample/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
22

3-
FROM mcr.microsoft.com/dotnet/aspnet:3.1-alpine3.12 AS base
3+
FROM mcr.microsoft.com/dotnet/aspnet:8.0-alpine AS base
44
RUN apk update && apk upgrade && apk add fontconfig
55
RUN apk add --update ttf-dejavu fontconfig
66
WORKDIR /app
77

8-
FROM mcr.microsoft.com/dotnet/sdk:3.1-alpine3.12 AS build
8+
FROM mcr.microsoft.com/dotnet/sdk:8.0-alpine AS build
99
WORKDIR /src
1010
COPY ["WordToPDFDockerSample.csproj", "."]
1111
RUN dotnet restore "./WordToPDFDockerSample.csproj"

Linux Docker/Alpine/WordToPDFDockerSample/WordToPDFDockerSample.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
77
<DockerfileContext>.</DockerfileContext>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.14" />
12-
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.80.2" />
13-
<PackageReference Include="Syncfusion.DocIORenderer.Net.Core" Version="19.2.0.55" />
11+
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.19.5" />
12+
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.6" />
13+
<PackageReference Include="Syncfusion.DocIORenderer.Net.Core" Version="*" />
1414
</ItemGroup>
1515

1616
</Project>
Lines changed: 31 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,36 @@
1-
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
1+
# Use the official .NET 8.0 SDK image from Microsoft for building the application
2+
FROM mcr.microsoft.com/dotnet/sdk:8.0 AS build
3+
RUN apt-get update -y && apt-get install libfontconfig -y
4+
WORKDIR /src
25

6+
# Copy the project file and restore dependencies
7+
COPY ["WordToPDFDockerSample.csproj", "."]
8+
RUN dotnet restore "WordToPDFDockerSample.csproj"
9+
10+
# Copy the rest of the application code and build the application
11+
COPY . .
12+
RUN dotnet build "WordToPDFDockerSample.csproj" -c Release -o /app/build
13+
14+
# Publish the application
15+
FROM build AS publish
16+
RUN dotnet publish "WordToPDFDockerSample.csproj" -c Release -o /app/publish /p:UseAppHost=false
17+
18+
# Use CentOS 8 as the base image for the final runtime
319
FROM centos:8
420

5-
Run dnf install dotnet-sdk-3.1 -y
6-
RUN dnf install dotnet-runtime-3.1 -y
21+
# Install .NET 8.0 runtime
22+
RUN dnf install -y https://packages.microsoft.com/config/centos/8/prod.repo \
23+
&& dnf install -y dotnet-runtime-8.0 \
24+
&& dnf clean all
25+
26+
# Install fontconfig for fonts
27+
RUN dnf install -y fontconfig
28+
29+
# Set the working directory
30+
WORKDIR /app
731

8-
RUN dnf install fontconfig -y
32+
# Copy the published application from the previous stage
33+
COPY --from=publish /app/publish .
934

10-
ENTRYPOINT ["dotnet" "WordToPDFDockerSample.dll"]
35+
# Set the entry point for the container
36+
ENTRYPOINT ["dotnet", "WordToPDFDockerSample.dll"]

Linux Docker/CentOS/WordToPDFDockerSample/WordToPDFDockerSample.csproj

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
77
<DockerfileContext>.</DockerfileContext>
88
</PropertyGroup>
99

1010
<ItemGroup>
1111
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.14" />
12-
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.80.2" />
13-
<PackageReference Include="Syncfusion.DocIORenderer.Net.Core" Version="19.2.0.55" />
12+
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.6" />
13+
<PackageReference Include="Syncfusion.DocIORenderer.Net.Core" Version="*" />
1414
</ItemGroup>
1515

1616
</Project>

Linux Docker/Debian/WordToPDFDockerSample/Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
#See https://aka.ms/containerfastmode to understand how Visual Studio uses this Dockerfile to build your images for faster debugging.
22

3-
FROM mcr.microsoft.com/dotnet/aspnet:3.1-buster-slim AS base
3+
FROM mcr.microsoft.com/dotnet/aspnet:8.0-buster-slim AS base
44
RUN apt-get update -y && apt-get install fontconfig -y
55
WORKDIR /app
66

7-
FROM mcr.microsoft.com/dotnet/sdk:3.1-buster-slim AS build
7+
FROM mcr.microsoft.com/dotnet/sdk:8.0-buster-slim AS build
88
WORKDIR /src
99
COPY ["WordToPDFDockerSample.csproj", "."]
1010
RUN dotnet restore "./WordToPDFDockerSample.csproj"

Linux Docker/Debian/WordToPDFDockerSample/WordToPDFDockerSample.csproj

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,15 @@
22

33
<PropertyGroup>
44
<OutputType>Exe</OutputType>
5-
<TargetFramework>netcoreapp3.1</TargetFramework>
5+
<TargetFramework>net8.0</TargetFramework>
66
<DockerDefaultTargetOS>Linux</DockerDefaultTargetOS>
77
<DockerfileContext>.</DockerfileContext>
88
</PropertyGroup>
99

1010
<ItemGroup>
11-
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.10.14" />
12-
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.80.2" />
13-
<PackageReference Include="Syncfusion.DocIORenderer.Net.Core" Version="19.2.0.55" />
11+
<PackageReference Include="Microsoft.VisualStudio.Azure.Containers.Tools.Targets" Version="1.21.0" />
12+
<PackageReference Include="SkiaSharp.NativeAssets.Linux" Version="2.88.6" />
13+
<PackageReference Include="Syncfusion.DocIORenderer.Net.Core" Version="*" />
1414
</ItemGroup>
1515

1616
</Project>

Linux Docker/Fedora/WordToPDFDockerSample/Dockerfile

Lines changed: 20 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,26 @@
22

33
FROM fedora:latest
44

5-
Run dnf install dotnet-sdk-3.1 -y
6-
RUN dnf install dotnet-runtime-3.1 -y
5+
# Install .NET 8.0 SDK and runtime
6+
Run dnf install dotnet-sdk-8.0 -y
7+
RUN dnf install dotnet-runtime-8.0 -y
78

9+
# Install fontconfig for font support
810
RUN dnf install fontconfig -y
911

10-
ENTRYPOINT ["dotnet" "WordToPDFDockerSample.dll"]
12+
# Set the working directory
13+
WORKDIR /app
14+
15+
# Copy the application files
16+
COPY ["WordToPDFDockerSample.csproj", "."]
17+
RUN dotnet restore "WordToPDFDockerSample.csproj"
18+
COPY . .
19+
20+
# Build the application
21+
RUN dotnet build "WordToPDFDockerSample.csproj" -c Release -o /app/build
22+
23+
# Publish the application
24+
RUN dotnet publish "WordToPDFDockerSample.csproj" -c Release -o /app/publish
25+
26+
# Set the final stage to use the runtime image
27+
ENTRYPOINT ["dotnet", "WordToPDFDockerSample.dll"]

0 commit comments

Comments
 (0)