How to install docker and portainer in kali

How to install docker and portainer in kali

With the emergence of docker, many services have gradually broken away from their dependence on hardware architecture. Many arm-structured hardware can also run x86 services. The speed of docker startup and deployment is also favored by geeks. I installed a kali on the Raspberry Pi 4B I bought myself. We all know that the Raspberry Pi is an arm-architecture CPU. I was going to deploy a nextcloud on it so I thought of docker.

Okay, let’s get to the command without further ado:

1. Install Docker and start Docker

sudo apt-get install docker
 
sudo systemctl start docker

2.Docker source acceleration (configure domestic sources)

sudo mkdir -p /etc/docker
sudo vi /etc/docker/daemon.json
 
{
    "registry-mirrors": ["http://hub-mirror.c.163.com"]
}

3. Install portainer graphical management interface

Because Docker is started by command and management is troublesome, we install a portainer container for graphical management

sudo docker pull portainer/portainer
 
sudo docker run -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock --restart=always --name prtainer portainer/portainer

Here we map docker's port 9000 directly to the external port 9000 and then we can access it through 127.0.0.1:9000

The first access requires the configuration of the admin password

After configuration is complete, log in:

Here we can choose local, or remote. Here we take local as an example:

Then all the local docker images will appear here and we can manage them on them

4. Some commonly used portainer operations and configurations for docker containers are here Duplicate/Edit

Click the container you want to configure

Click Duplicate/Edit

Here are some configuration options for the container

Modify the mapping port here:

You can change the time zone here:

Volumes is to mount the directory in the container to the local. You can also mount it to the local volume here. If it is a directory, click Bind.

This is the command we gave above --restart=always to start the container and then start it by itself

I discovered that I can also restart the container through Portainer.

You can also download the container:

The above is the details of installing docker and portainer on kali. For more information about installing docker on kali, please pay attention to other related articles on 123WORDPRESS.COM!

You may also be interested in:
  • Deployment and Chinese translation of the docker visualization tool Portainer
  • Project practice of deploying Docker containers using Portainer
  • How to use Portainer to build a visual interface for Docker
  • Tutorial on using portainer to connect to remote docker
  • Detailed explanation of docker visualization graphics tool portainer

<<:  Detailed explanation of MySQL file storage

>>:  Summary of several submission methods of HTML forms

Recommend

JavaScript navigator.userAgent obtains browser information case explanation

The browser is probably the most familiar tool fo...

Detailed explanation of dynamically generated tables using javascript

*Create a page: two input boxes and a button *Cod...

In-depth understanding of the life cycle comparison between Vue2 and Vue3

Table of contents Cycle comparison usage Summariz...

Sample code for implementing honeycomb/hexagonal atlas with CSS

I don’t know why, but UI likes to design honeycom...

js implements a simple English-Chinese dictionary

This article shares the specific code of js to im...

Solution to the problem of data loss when using Replace operation in MySQL

Preface The company's developers used the rep...

Tutorial on installing mysql under centos7

Recently, I plan to deploy a cloud disk on my hom...

Bootstrap realizes the effect of carousel

This article shares the specific code of Bootstra...

Vue uses three methods to refresh the page

When we are writing projects, we often encounter ...

What are the rules for context in JavaScript functions?

Table of contents 1. Rule 1: Object.Method() 1.1 ...

Complete steps to enable gzip compression in nginx

Table of contents Preface 1. Configure gzip compr...

A brief analysis of how to set the initial value of Linux root

Ubuntu does not allow root login by default, so t...

Use PHP's mail() function to send emails

Sending emails using PHP's mail function The ...

A brief talk about React Router's history

If you want to understand React Router, you shoul...

Is the tag li a block-level element?

Why can it set the height, but unlike elements lik...