Skip to content

Commit ec9107d

Browse files
Merge pull request #1434 from syncfusion-content/976091-azContainer
976091: Prepare documentation for deploying Web App server as docker images
2 parents 56fcd0e + 53794e4 commit ec9107d

File tree

6 files changed

+109
-0
lines changed

6 files changed

+109
-0
lines changed

Document-Processing-toc.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1644,6 +1644,11 @@
16441644
</ul>
16451645
</li>
16461646
</li>
1647+
<li>Deployment
1648+
<ul>
1649+
<li> <a href="/document-processing/pdf/smart-pdf-viewer/blazor/how-to/dockerImage-hosting-guide">Docker Image Hosting Guide for Blazor Web App</a></li>
1650+
</ul>
1651+
</li>
16471652
<li><a href="/document-processing/pdf/smart-pdf-viewer/blazor/document-summarizer">Document Summarizer</a></li>
16481653
<li><a href="/document-processing/pdf/smart-pdf-viewer/blazor/smart-redaction">Smart Redaction</a></li>
16491654
<li><a href="/document-processing/pdf/smart-pdf-viewer/blazor/smart-fill">Smart Fill</a></li>
Lines changed: 104 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,104 @@
1+
---
2+
layout: post
3+
title: Docker Image Hosting Guide for Blazor Web App | Syncfusion
4+
description: Learn here all about creating Docker image from Blazor Smart PDF Viewer Web App and ensure the images locally by hosting it as a link.
5+
platform: document-processing
6+
control: SfSmartPdfViewer
7+
documentation: ug
8+
---
9+
10+
# Docker Image Hosting Guide for Blazor Web App
11+
12+
We aim to assist developers in reducing deployment time and simplifying the publishing process using Docker images. The [Syncfusion Document Processing API](https://hub.docker.com/r/syncfusion/document-processing-apis) is available as a ready-to-use Docker image for document processing APIs that ensures a seamless experience for Docker users. The following sections will guide you on how to publish docker images.
13+
14+
## Deployment requirement
15+
### Hardware requirement
16+
The following hardware requirements are necessary to run document processing API
17+
18+
Windows
19+
CPU: 2-core
20+
Memory: 8GB RAM
21+
Disk space: 8GB or more
22+
23+
### Software requirements
24+
The following software requirements are necessary to run document processing API
25+
26+
Application: Rancher Desktop.
27+
Web Browser: Microsoft Edge, Mozilla Firefox, and Chrome.
28+
29+
## Steps to configure and run docker container
30+
### Step1:
31+
Install the Rancher desktop application [Rancher Desktop](https://github.com/rancher-sandbox/rancher-desktop/releases)
32+
33+
### Step2:
34+
Open the rancher desktop application Select the displayed option.
35+
![Docker Moby](../images/docker-moby.png)
36+
37+
### Step3:
38+
Create a Smart Pdf Viewer web app sample using the following [documentation](https://help.syncfusion.com/document-processing/pdf/smart-pdf-viewer/blazor/getting-started/web-app).
39+
40+
### Step4:
41+
Right-click Smart PDF Viewer web app sample to add the docker support with Linux.
42+
![Docker Support](../images/add-docker-support.png).
43+
44+
### Step5:
45+
Once the docker file is added open the docker file and add the following line
46+
47+
{% tabs %}
48+
{% highlight c# tabtitle="Dockerfile" hl_lines="2 4 6" %}
49+
FROM mcr.microsoft.com/dotnet/aspnet:9.0 AS base
50+
RUN ln -s /lib/x86_64-linux-gnu/libdl-2.24.so /lib/x86_64-linux-gnu/libdl.so
51+
52+
RUN apt-get update && apt-get install -y --allow-unauthenticated libgdiplus libc6-dev libx11-dev
53+
54+
RUN ln -s libgdiplus.so gdiplus.dll
55+
56+
57+
USER root
58+
59+
60+
WORKDIR /app
61+
62+
63+
EXPOSE 8080
64+
EXPOSE 8081
65+
....
66+
{% endhighlight %}
67+
{% endtabs %}
68+
69+
![Docker Support Line](../images/line-to-add-docker.png).
70+
N> Remove the `User` if not needed or change the User type to `root` for providing elevated privileges.
71+
72+
### Step6:
73+
Publish the image by building the DockerFile
74+
![Build Docker File](../images/build-docker.png).
75+
76+
### Step7:
77+
Open the comment prompt or power shell and enter the following command to list the published docker images.
78+
79+
{% tabs %}
80+
{% highlight c# tabtitle="Docker Image" %}
81+
82+
docker image ls
83+
84+
{% endhighlight %}
85+
{% endtabs %}
86+
87+
### Step8:
88+
To check the published images locally, run the below command which is in the format docker run -d -p 6001:{exposed Port} {Image ID}.
89+
90+
{% tabs %}
91+
{% highlight c# tabtitle="Docker Run" %}
92+
93+
docker run -d -p 6001:8080 4eead1aaf7a5
94+
95+
{% endhighlight %}
96+
{% endtabs %}
97+
98+
### Step9:
99+
Ensure the published image is as per requirement in the hosted link `http://localhost:6001/`
100+
101+
## See also
102+
103+
* [Steps to deploy Docker Images from Container Registry to Azure App Services](https://learn.microsoft.com/en-us/azure/app-service/quickstart-custom-container?tabs=dotnet&pivots=container-linux-azure-portal).
104+
64.8 KB
Loading
13.1 KB
Loading
26.7 KB
Loading
48.2 KB
Loading

0 commit comments

Comments
 (0)