Saltar al pie de página
USANDO IRONSECUREDOC

Cómo instalar Portainer (Tutorial para desarrolladores)

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.

Preguntas Frecuentes

¿Cómo se instala Portainer en un entorno Windows con Docker Desktop?

Para instalar Portainer en un entorno Windows con Docker Desktop, asegúrese primero de tener instalados Docker y Docker Desktop. Cree un volumen de Docker para los datos de Portainer usando docker volume create portainer_data. Luego, ejecute el contenedor del servidor Portainer con 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.

¿Cuál es el principal beneficio de usar Portainer para gestionar entornos Docker?

Portainer proporciona una interfaz web fácil de usar para gestionar entornos Docker, lo que simplifica la gestión de contenedores, redes, imágenes y volúmenes sin la necesidad de utilizar herramientas complejas de línea de comandos. Soporta entornos de nodo único y multinodo, mejorando la eficiencia operativa.

¿Cómo puede Portainer ayudar con la gestión de Kubernetes?

Portainer soporta entornos de Kubernetes, ofreciendo características como gestión del ciclo de vida de contenedores, gestión de imágenes y pilas, y monitoreo en tiempo real. Esto permite a desarrolladores y administradores de sistemas gestionar clústeres de Kubernetes de manera efectiva a través de una interfaz gráfica.

¿Cuáles son los requisitos previos para instalar Portainer?

Antes de instalar Portainer, asegúrese de tener Docker y Docker Desktop instalados en su sistema. Además, para entornos Windows, es necesario tener configurado WSL2 para soportar las instalaciones de Docker Desktop y Portainer.

¿Cómo puede acceder a la interfaz de Portainer después de la instalación?

Una vez instalado Portainer, puede acceder a su interfaz abriendo un navegador web y navegando a https://localhost:9443. Si es necesario, reemplace 'localhost' con la dirección IP o el nombre de dominio completamente cualificado (FQDN) apropiado.

¿Qué características ofrece Portainer para la gestión del ciclo de vida de contenedores?

Portainer ofrece características para la gestión del ciclo de vida de contenedores, incluyendo la creación, modificación y eliminación de contenedores. También proporciona herramientas para gestionar redes, volúmenes e imágenes de contenedores, todo a través de una interfaz web intuitiva.

¿Cómo mejora IronSecureDoc la seguridad de documentos en entornos en contenedores?

IronSecureDoc mejora la seguridad de documentos proporcionando características de cifrado, redacción y firma digital. Asegura que los documentos estén protegidos, manteniendo su confidencialidad y autenticidad, lo cual es crucial para el cumplimiento de estándares y regulaciones de privacidad en entornos en contenedores.

Curtis Chau
Escritor Técnico

Curtis Chau tiene una licenciatura en Ciencias de la Computación (Carleton University) y se especializa en el desarrollo front-end con experiencia en Node.js, TypeScript, JavaScript y React. Apasionado por crear interfaces de usuario intuitivas y estéticamente agradables, disfruta trabajando con frameworks modernos y creando manuales bien ...

Leer más