跳至页脚内容
使用 IRONSECUREDOC

如何安装 Portainer(开发者教程)

What is Portainer?

Portainer is a lightweight, open-source platform that simplifies the management of containerized applications running on Docker, Kubernetes, and other environments for container orchestration. The main objective of Portainer is to provide a graphical interface to manage Docker containers and Docker groups, making it easy to use and freeing the system administrator or developer from the complexity of managing the containers through the command line. Developers and system administrators can accomplish all this through a web-based dashboard that monitors, deploys, and manages containers, networks, images, and volumes in Portainer.

Portainer supports single-node and multi-node environments, such as Docker Swarm, Kubernetes clusters, and Nomad environments. Its functionalities include managing the lifecycle of containers (start/stop/delete), monitoring resources, log access, and role-based access control to handle multi-user environments easily and securely. It also provides native integration for both Docker Compose and Kubernetes manifests to enable deployments of multi-container applications easily.

It is of real value to administrators who need greater visibility and control over their infrastructure, especially in a production environment. It is easy to adopt among new users and is popular for small teams and large enterprises that require an efficient, streamlined method of container management and orchestration of complex applications.

Features of Portainer

Portainer provides features that make it easier to operate containerized applications. Some significant features are as follows:

1. User-friendly Web Interface

Portainer UI offers an easy-to-use, web-based GUI that ensures that everything related to managing a container, network, volume, and images is implemented with less reliance on the command line.

2. Multi-platform Support

It supports multiple platforms:

  • Docker: Portainer manages either a single-host or Docker Swarm environment.
  • Kubernetes: It manages Kubernetes clusters and workloads.
  • Nomad: Portainer offers integration capabilities for the orchestrator, HashiCorp Nomad.

3. Container Life Cycle Management

Allows for various operations, such as starting, stopping, restarting, pausing, and deleting a container.

4. Image Management

Pulls images from registries and manages local image repositories. Also deletes unused images and integrates with private Docker registries.

5. Stack Management

Allows deployment and management of multi-container applications using Docker Compose or Kubernetes manifests, also known as Helm charts for Kubernetes.

6. Volume and Network Management

Simplifies the creation, management, and deletion of Docker containers, volumes, and networks. You are entirely in control over your persistent data and network configurations.

7. Role-based Access Control (RBAC)

Controls access and permissions for different users in the environment, providing fine-grained control over who can do what.

8. Logs and Monitoring

Provides real-time container logs and performance metrics, like CPU and memory usage, to help monitor and debug.

9. Templates and App Catalog

Offers ready-made application templates that simplify the deployment of common services or apps.

10. External Authentication

Supports two types of authentication systems, LDAP and OAuth-based, which strengthen security and provide solid integration with corporate environments.

11. Backup and Restore

Allows the capability to back up and restore Portainer's settings and environments to ensure a recovery process in case of failures.

12. API Access

Allows programmatic control and integration of external tools through a full-featured API.

These features make Portainer great for containerized application administrators working in development, testing, or production environments, suitable for both novices and veterans alike.

Install Portainer

Portainer consists of two main components: the Portainer Server and the Portainer Agent. These are extremely lightweight Docker containers that run on a Docker engine. Here, we will guide you through the steps to install a Portainer Server container within your Windows environment with WSL and Docker Desktop already installed.

Requirements

  • Have Docker and the latest version of Docker Desktop installed.
  • Administrative access to the machine to host your instance of Portainer Server.
  • WSL2 and a Linux distribution installed and activated. Ensure that WSL2 is installed before installing a Linux distribution.
  • By default, the Portainer Server exposes the UI over port 9443 and a TCP tunnel server over port 8000. The latter is necessary only if you are using the Edge compute features with Edge agents.

Steps to Install Portainer

To store the database on the Portainer Server, first, create the volume:

docker volume create portainer_data
docker volume create portainer_data
SHELL

Then, use PowerShell or the Command Prompt with Docker CLI to execute the following command to download and install, and then create the Portainer Server container.

docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest
SHELL

You now have the Portainer Server installed. You can determine if the Portainer Server container is running with this command:

docker ps
docker ps
SHELL

Logging into Portainer

Once installation is complete, access your Portainer Server instance in a web browser at https://localhost:9443. Replace localhost with the appropriate IP address or FQDN if necessary and adjust the port if it was changed. You will be presented with the initial setup page of the Portainer Server.

The first user will be the administrator. Although 'admin' is the default login, you can modify it. The password should meet the specified parameters and have a minimum length of 12 characters. On the next page, enter the Portainer Community Edition license key you received, paste it into the appropriate box, and then press Submit.

Next, the system will redirect you to the Portainer dashboard, where you can view the list of environments available on the machine. You can connect to existing Docker containers by clicking the connect button.

Click "Add Environments" to manage additional environments with this Portainer instance. Otherwise, select "Get Started" to begin utilizing Portainer.

What is IronsecureDoc?

IronSecureDoc is a security tool for documents, protecting sensitive files by providing encryption, redaction, and digital signing features. It allows users to secure PDF files, ensuring personal and confidential data remain protected. Features include password protection, compliance with standards such as PDF/A, and digital certification. It is primarily used in legal, healthcare, or financial fields. The software is accessible as a REST API, integrated into different workflows, and can be deployed as a Docker container for scalable, cloud-friendly security solutions.

Features of IronSecureDoc

IronSecureDoc handles PDF security and document management impressively. Its features include encryption, redaction, and digital signing.

Encryption: Provides encryption of PDF documents with 128 or 256-bit encryption and password-based security to ensure data confidentiality.

Redaction: Removes confidential data, such as personal identifiers or other sensitive information, in compliance with privacy standards and regulations.

Digital Signing: Facilitates digital signing and notarizing PDFs using .pfx or .p12 to authenticate documents.

Install and Running IronsecureDoc

Use this command to pull the IronSecureDoc Docker image from the repository in an open terminal window or Command Prompt.

docker pull ironsoftwareofficial/ironsecuredoc
docker pull ironsoftwareofficial/ironsecuredoc
SHELL

Once the Docker image is pulled, run another command to start the IronSecureDoc 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

Replace <IRONSECUREDOC_LICENSE_KEY> with your actual IronSecureDoc license key.

Using IronSecureDoc with Docker Container

After installation and launch in Docker, IronSecureDoc can redact, certify, and encrypt documents using its REST API. Refer to API endpoints and documentation: http://localhost:8080/swagger/index.html.

Here's an example of how to submit a document for encryption using a cURL POST request:

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 sends the document to IronSecureDoc, which applies the specified encryption.

Conclusion

Portainer and IronSecureDoc are powerful tools for container management and secure document management, providing significant value in the modern age of DevOps and IT.

Portainer provides an intuitive, modern UI that simplifies deploying, monitoring, and scaling containerized applications on Docker, Kubernetes, and other container platforms. Its extensive features, including RBAC, logs, stack management, and multi-platform support, make it accessible to small teams and large corporations alike.

IronSecureDoc focuses on signing, encryption, and securing sensitive documents and other digital assets in a Docker environment. It aims to enhance an organization's security posture, aligning with data protection standards and reducing risk.

These two technologies enable users to manage containers with assured document integrity and security in such environments. Portainer and IronSecureDoc are thus pivotal in the contemporary cloud and containerized paradigm, managing applications at scale and securing essential data. Click this link to learn more about IronSecureDoc licensing and visit this link for more information about the products that Iron Software offers.

常见问题解答

如何在带有Docker Desktop的Windows环境中安装Portainer?

要在带有Docker Desktop的Windows环境中安装Portainer,首先确保已安装Docker和Docker Desktop。使用 docker volume create portainer_data 为Portainer数据创建Docker卷。然后,使用 docker run -d -p 8000:8000 -p 9443:9443 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:latest 运行Portainer服务器容器。

使用Portainer管理Docker环境的主要好处是什么?

Portainer提供一个用户友好的Web界面来管理Docker环境,这简化了容器、网络、镜像和卷的管理,而无需使用复杂的命令行工具。它支持单节点和多节点环境,提高操作效率。

Portainer如何协助Kubernetes管理?

Portainer支持Kubernetes环境,提供容器生命周期管理、镜像和堆栈管理、实时监控等功能。通过图形界面,帮助开发人员和系统管理员有效管理Kubernetes集群。

安装Portainer的先决条件是什么?

在安装Portainer之前,请确保您的系统上已安装Docker和Docker Desktop。此外,对于Windows环境,配置WSL2是必要的,以支持Docker Desktop和Portainer的安装。

安装后如何访问Portainer界面?

一旦安装Portainer,可以通过打开浏览器并导航到 https://localhost:9443 访问其界面。如果需要,请将 'localhost' 替换为适当的IP地址或完全合格的域名(FQDN)。

Portainer 在容器生命周期管理方面提供了哪些功能?

Portainer提供容器生命周期管理功能,包括容器的创建、修改和删除。它还提供管理容器网络、卷和镜像的工具,所有这些都通过直观的Web界面完成。

IronSecureDoc 如何在容器化环境中增强文档安全性?

IronSecureDoc通过提供加密、编辑和数字签名功能来增强文档安全性。它确保文档受到保护,保持机密性和真实性,这对遵守容器化环境中的隐私标准和法规至关重要。

Curtis Chau
技术作家

Curtis Chau 拥有卡尔顿大学的计算机科学学士学位,专注于前端开发,精通 Node.js、TypeScript、JavaScript 和 React。他热衷于打造直观且美观的用户界面,喜欢使用现代框架并创建结构良好、视觉吸引力强的手册。

除了开发之外,Curtis 对物联网 (IoT) 有浓厚的兴趣,探索将硬件和软件集成的新方法。在空闲时间,他喜欢玩游戏和构建 Discord 机器人,将他对技术的热爱与创造力相结合。