使用 IRONSECUREDOC Docker Compose 構建(開發者教程) Curtis Chau 更新日期:6月 22, 2025 Download IronSecureDoc 免費下載 Start Free Trial Copy for LLMs Copy for LLMs Copy page as Markdown for LLMs Open in ChatGPT Ask ChatGPT about this page Open in Gemini Ask Gemini about this page Open in Grok Ask Grok about this page Open in Perplexity Ask Perplexity about this page Share Share on Facebook Share on X (Twitter) Share on LinkedIn Copy URL Email article What is Docker? Docker is an open-source platform that simplifies the process of developing, deploying, and running applications using containerization. Containers are ultralight, portable units that package an application along with its dependencies, enabling consistent execution across diverse environments, from a developer's local system to production servers. Unlike traditional virtual machines, containers utilize the host operating system's kernel, enhancing their speed and efficiency. Docker offers a virtualized template through Docker images to create and manage sets of containers. It includes the Docker Hub, a form of container image repository. The great appeal of this technology is its scalability, portability, and efficiency, making it highly popular in DevOps and cloud-centric development workflows. How does Docker work? The Docker Daemon listens for requests from the Docker Client, which may include docker build, docker pull, or docker run. Docker Daemon handles the creation, management, and monitoring of containers. It also retrieves the required Docker images from a registry, such as Docker Hub. Using the downloaded image, the daemon creates an isolated container, effectively a running instance of the application. Containers share the host machine's OS kernel but remain isolated from each other, enabling the software to operate in a unique environment with its dependencies. +--------------------+ | Docker Client | | (CLI/API) | +--------------------+ | v +--------------------+ +---------------------+ | Docker Daemon | --------> | Docker Registry | | (manages resources| | (stores images) | | & runs containers)| +---------------------+ +--------------------+ | v +---------------------+ | Container | | (App Instance) | +---------------------+ | v +---------------------+ | Docker Image | | (App Blueprint) | +---------------------+ What is Docker Compose? Docker Compose provides an easy way to manage a multi-container Docker application using a single file: docker-compose.yml. This YAML file enables the configuration of multiple services, specifying aspects like Docker images, environment variables, networks, and volumes. You can utilize Docker Compose commands such as docker-compose up or docker-compose down to manage all containers in an application with a single action. +--------------------------+ | docker-compose.yml | (Configuration file) +--------------------------+ | v +----------------+ +----------------+ +----------------+ | Service 1 | | Service 2 | | Service 3 | | (e.g. web) | | (e.g. db) | | (e.g. cache) | +----------------+ +----------------+ +----------------+ | | | ----------------------------------------- Docker Application Docker Compose is particularly advantageous for complex applications like microservices with numerous container instances. It is effectively used across development, testing, and production settings. Create a New React JS application With ASP.NET Core Follow these steps to create a new Visual Studio React application with an ASP.NET Core backend and add Docker support: Prerequisites Visual Studio: Ensure Visual Studio 2022 or newer is installed with necessary workloads: Web development and ASP.NET Node.js development (React) Docker Support Docker Desktop: Must be installed and running. Create New Project Open Visual Studio and choose New Project from the menu. Search for "React and ASP.NET Core Web Application" in the "Create a new project" dialog and select it. Click Next. Provide a name for the project, select a solution name, and choose the save location. Click Next. Ensure Docker Support is enabled. Select the desired framework and click Create. After project creation, add Docker support by right-clicking the project node and selecting Add > Docker Support. Choose the container name and type, then click Ok. Now that the newly created project is added to the Docker container, Docker Compose commands can run it. Below is a sample output generated from the React JS client-side code. Below is the API server-side code executing from the Docker container. IronSecureDoc IronSecureDoc enables developers to efficiently embed secure document processing into containerized applications. With Docker's support, encapsulate your ASP.NET Core app using IronSecureDoc, encouraging seamless deployment and scaling. Build a Dockerfile to integrate IronSecureDoc with your ASP.NET Core app, along with necessary scripts or configurations. Moreover, a docker-compose.yml file can outline service dependencies and environment variables for easy access, assisting in handling document security tasks efficiently in different deployment settings. Ensuring the install and configuration of IronSecureDoc, like Docker, is essential for delivering features like document encryption and redaction. Installing and Running IronSecureDoc Retrieve the IronSecureDoc Docker image with this command: docker pull ironsoftwareofficial/ironsecuredoc docker pull ironsoftwareofficial/ironsecuredoc SHELL After pulling the image, use the following command to launch IronSecureDoc in a new container: docker container run --rm -p 8080:8080 -e IronSecureDoc_LicenseKey=<IRONSECUREDOC_LICENSE_KEY> -e ENVIRONMENT=Development -e HTTP_PORTS=8080 ironsoftwareofficial/ironsecuredoc:latest docker container run --rm -p 8080:8080 -e IronSecureDoc_LicenseKey=<IRONSECUREDOC_LICENSE_KEY> -e ENVIRONMENT=Development -e HTTP_PORTS=8080 ironsoftwareofficial/ironsecuredoc:latest SHELL Using IronSecureDoc with Docker Container IronSecureDoc's REST API allows document operations like redaction, certification, and encryption once installed and running in Docker. For more on API endpoints, check the documentation. To encrypt a document, send a POST request to the IronSecureDoc API: curl -X 'POST' \ 'http://localhost:8080/v1/document-services/pdfs/encrypt?user_password=demo' \ -H 'accept: */*' \ -H 'Content-Type: multipart/form-data' \ -F 'pdf_file=@test.pdf;type=application/pdf' curl -X 'POST' \ 'http://localhost:8080/v1/document-services/pdfs/encrypt?user_password=demo' \ -H 'accept: */*' \ -H 'Content-Type: multipart/form-data' \ -F 'pdf_file=@test.pdf;type=application/pdf' SHELL This command submits the document to IronSecureDoc for encryption. Conclusion Integrating Docker Compose with IronSecureDoc greatly enhances the efficiency and reliability of applications requiring secure document handling. Docker Compose effectively manages multi-container applications, streamlining dependencies and services coordination, including IronSecureDoc, which ensures development environment consistency, simplifies configurations, and boosts scalability. In this setup, developers can fully leverage document security features, like encryption and redaction, within a containerized framework. Overall, combining Docker Compose with IronSecureDoc enriches the development process, offering a secure, efficient method for handling sensitive documents in modern applications. For information on IronSecureDoc licensing, visit this page. Click here to explore more Iron Software products. 常見問題解答 什麼是 Docker 以及它如何促進應用程式部署? Docker 是一個開源平台,通過使用容器來簡化應用程式的開發和部署。容器是輕量級、可移植的單位,將應用程式及其所有依賴包裝在一起,確保在各種環境中的一致執行。 Docker Compose 如何幫助管理複雜的應用程式? Docker Compose 是一個通過 `docker-compose.yml` 文件管理多容器 Docker 應用程式的工具。它簡化了服務、映像、網絡和卷的配置和協調,使其成為管理微服務等複雜應用程式的理想選擇。 如何使用 Docker 在 Visual Studio 中創建具有 ASP.NET Core 的 React JS 應用程式? 要使用 Docker 在 Visual Studio 中創建具有 ASP.NET Core 的 React JS 應用程式,確保您有 Visual Studio 2022 或更高版本,並安裝了必要的工作負載和 Docker Desktop。創建專案,添加 Docker 支援,並使用 Docker Compose 命令管理應用程式。 IronSecureDoc 如何與 Docker 整合以實現安全文件處理? IronSecureDoc 可以通過拉取其 Docker 映像並在容器中運行來與 Docker 整合。該設置允許通過其 REST API 執行加密和消除等安全文件處理操作,增強容器化應用程式的安全性。 使用 Docker Compose 和 IronSecureDoc 進行文件處理有哪些好處? 將 Docker Compose 與 IronSecureDoc 結合使用提高了應用程式的效率和可靠性,通過在容器化環境中管理依賴項和服務。這確保了安全和可擴展的文件處理,對於需要健全文件安全性的應用程序至關重要。 如何向現有的 Visual Studio 專案添加 Docker 支援? 要向現有的 Visual Studio 專案添加 Docker 支援,右鍵點擊專案節點,選擇 添加 > Docker 支援,然後選擇適當的容器選項。這將 Docker 功能整合到您的專案中,允許容器化的開發。 在 Docker 容器中運行 IronSecureDoc 的過程是什麼? 要在 Docker 容器中運行 IronSecureDoc,使用 `docker pull` 命令獲取映像,然後使用必要的環境變數(如許可證密鑰和端口)執行 `docker container run`。此設置促進了容器內的安全文件處理。 如何在 Docker 環境中使用 IronSecureDoc 加密文件? 您可以通過發送 POST 請求到其 API 來使用 IronSecureDoc 加密文件。使用 `curl` 命令上傳文件,指定本地文件路徑和加密參數。此操作在 Docker 容器中保護文件。 Curtis Chau 立即與工程團隊聊天 技術作家 Curtis Chau 擁有卡爾頓大學計算機科學學士學位,專注於前端開發,擅長於 Node.js、TypeScript、JavaScript 和 React。Curtis 熱衷於創建直觀且美觀的用戶界面,喜歡使用現代框架並打造結構良好、視覺吸引人的手冊。除了開發之外,Curtis 對物聯網 (IoT) 有著濃厚的興趣,探索將硬體和軟體結合的創新方式。在閒暇時間,他喜愛遊戲並構建 Discord 機器人,結合科技與創意的樂趣。 相關文章 更新日期 7月 22, 2025 immich Docker Compose(開發者如何工作) Immich Docker 是一個在 Docker 容器中設置的 Immich 自託管照片和影片備份解決方案。Docker 是一個輕量且被廣泛採用的平台,用於開發、分發 閱讀更多 更新日期 6月 22, 2025 Wazuh Docker Compose(開發者如何工作) Wazuh Docker 是 Wazuh 安全平台的 Docker 化部署,簡化並增強了安全監控、威脅檢測和合規管理的實施 閱讀更多 更新日期 6月 22, 2025 Coolify Docker Compose(開發者如何工作) Coolify 是一個開源且自託管的平台,旨在簡化應用程式、資料庫和網站的部署和管理。 閱讀更多 Docker Compose 環境變數(開發者教程)如何安裝 Portainer(開發者...
更新日期 7月 22, 2025 immich Docker Compose(開發者如何工作) Immich Docker 是一個在 Docker 容器中設置的 Immich 自託管照片和影片備份解決方案。Docker 是一個輕量且被廣泛採用的平台,用於開發、分發 閱讀更多
更新日期 6月 22, 2025 Wazuh Docker Compose(開發者如何工作) Wazuh Docker 是 Wazuh 安全平台的 Docker 化部署,簡化並增強了安全監控、威脅檢測和合規管理的實施 閱讀更多