DEV Community

Cover image for INSTALL DOCKER
Reynaldo Quispe Soca
Reynaldo Quispe Soca

Posted on

1

INSTALL DOCKER

  1. Actualizar

sudo apt update

  1. LINK:

sudo apt install apt-transport-https ca-certificates curl software-properties-common

  1. LINK:

curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -

  1. LINK

sudo add-apt-repository "deb [arch=amd64] https://download.docker.com/linux/ubuntu focal stable"

  1. LINK

sudo apt install docker-ce

  1. LINK: VER el estado

sudo systemctl status docker
7.Version
docker version

  1. descarga alguna imagen

docker pull image(example: mysql)
docker images (listar imagenes ISO)

  1. LINK

docker run -d -p 33060:3306 --name mysql-db -e MYSQL_ROOT_PASSWORD=secret mysql

  1. Para ver que puertos esta corriendo

sudo docker ps -a

  1. Mstrar contenedores

sudo docker container ls -a

12 correr contenedores:

docker exec -it mysql-db mysql -p

  1. ELiminaer contenedor docker sudo docker rm 4e(CONTAINER_ID)

https://platzi.com/tutoriales/1432-docker/3268-como-crear-un-contenedor-con-docker-mysql-y-persistir-la-informacion/

  1. sudo docker inspect CONTAINER_ID

OJO:
Para usuarios de DBeaver :

Haga clic derecho en su conexión, elija "Editar conexión"

En la pantalla "Configuración de conexión" (pantalla principal) haga clic en "Editar configuración del controlador"

Haga clic en "Propiedades de conexión"

Haga clic derecho en el área de "propiedades de usuario" y elija "Agregar nueva propiedad"

Agregue dos propiedades: "useSSL" y "allowPublicKeyRetrieval"

Establezca sus valores en "falso" y "verdadero" haciendo doble clic en la columna "valor"

---DOCKER POSTGRESS
-docker pull postgress
-docker images (para ver imagenes)
-sudo docker run -d -p 54320:5432 --name postgres-db -e POSTGRES_PASSWORD=secret postgres
-sudo docker exec -it postgres-db psql -U postgres
-ahora crear dbs
CADA VEZ QUE QUIERES ARRANCAR EL DEMONIO CUANDO YA ESTAB CREADO LOS PUERTOS
sudo docker start d8
sudo stop start d8(iniciales de container ID)

Hostinger image

Get n8n VPS hosting 3x cheaper than a cloud solution

Get fast, easy, secure n8n VPS hosting from $4.99/mo at Hostinger. Automate any workflow using a pre-installed n8n application and no-code customization.

Start now

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

Best practices for optimal infrastructure performance with Magento

Running a Magento store? Struggling with performance bottlenecks? Join us and get actionable insights and real-world strategies to keep your store fast and reliable.

Tune in to the full event

DEV is partnering to bring live events to the community. Join us or dismiss this billboard if you're not interested. ❤️