DOCKER: mudanças entre as edições

De Wiki Clusterlab.com.br
Ir para navegação Ir para pesquisar
Sem resumo de edição
Sem resumo de edição
 
(2 revisões intermediárias pelo mesmo usuário não estão sendo mostradas)
Linha 17: Linha 17:
</syntaxhighlight >
</syntaxhighlight >
=Utils=
=Utils=
<pre>
Jenkins
Jenkins
Official
Official
<pre>
#docker run -d --restart always --name myjenkins -p 9001:8080 -p 50001:50000 -v /var/jenkins_home jenkins
#docker run -d --restart always --name myjenkins -p 9001:8080 -p 50001:50000 -v /var/jenkins_home jenkins
https://hub.docker.com/r/jenkins/jenkins
https://hub.docker.com/r/jenkins/jenkins
#docker run -d --restart always --name myjenkins -p 9001:8080 -p 50001:50000 -v /var/jenkins_home jenkins/jenkins:lts
#docker run -d --restart always --name myjenkins -p 9001:8080 -p 50001:50000 -v /var/jenkins_home jenkins/jenkins:lts
</pre>
SonaType/Nexus
<pre>


SonaType/Nexus
docker volume create nexus3
docker volume create nexus3
docker run -d -p 8081:8081 --restart always  -v nexus3:/stnexus3  --name nexus3 -e INSTALL4J_ADD_VM_PARAMS="-Xms2g -Xmx2g -XX:MaxDirectMemorySize=3g  -Djava.util.prefs.userRoot=/stnexus3" sonatype/nexus3
docker run -d -p 8081:8081 --restart always  -v nexus3:/stnexus3  --name nexus3 -e INSTALL4J_ADD_VM_PARAMS="-Xms2g -Xmx2g -XX:MaxDirectMemorySize=3g  -Djava.util.prefs.userRoot=/stnexus3" sonatype/nexus3
</pre>
Kafka
<pre>


Kafka
docker run --name some-zookeeper --restart always -d zookeeper
docker run --name some-zookeeper --restart always -d zookeeper
docker run -d --restart always --link some-zookeeper:zookeeper -d application-that-uses-zookeeper --name kafka-manager -eZK_HOSTS=zookeeper kafkamanager/kafka-manager
docker run -d --restart always --link some-zookeeper:zookeeper -d application-that-uses-zookeeper --name kafka-manager -eZK_HOSTS=zookeeper kafkamanager/kafka-manager
 
</pre>
 
Postgres
<pre>
docker volume create postgres_data
docker run -d --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -e PGDATA=/var/lib/postgresql/data/pgdata -v postgres_data:/var/lib/postgresql/data postgres
</pre>
docker-compose.yaml
docker-compose.yaml
 
<pre>
version: '2'
version: '2'
services:
services:
Linha 60: Linha 69:
     -p 8111:8111 \
     -p 8111:8111 \
     jetbrains/teamcity-server:2018.2.2
     jetbrains/teamcity-server:2018.2.2
</pre>
Portainer
<pre>


Portainer
docker volume create portainer_data
docker volume create portainer_data
docker run --restart always -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.20.1
docker run --restart always -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.20.1
</pre>
</pre>

Edição atual tal como às 20h42min de 25 de novembro de 2024

DOCS

Comamnds

docker exec -it container-name bash
docker commit container-ID image-name
docker run -i -t ubuntu:22:10 /bin/bash
docker pull ansible/awx_rabbitmq:3.7.21
docker save ansible/awx_rabbitmq:3.7.21 | pv | pigz -p 4 -9 > awx_rabbitmq.tgz
gzip -d awx_rabbitmq.tgz
docker load --input awx_rabbitmq.tar
docker images | grep ^docker | while read a{1..8}; do docker save $a1:$a2 | pv | pigz -p 4 -9 > $(echo $a1 | awk -F \/ '{print $3}').tgz ;done

Utils

Jenkins Official


#docker run -d --restart always --name myjenkins -p 9001:8080 -p 50001:50000 -v /var/jenkins_home jenkins
https://hub.docker.com/r/jenkins/jenkins
#docker run -d --restart always --name myjenkins -p 9001:8080 -p 50001:50000 -v /var/jenkins_home jenkins/jenkins:lts

SonaType/Nexus


docker volume create nexus3
docker run -d -p 8081:8081 --restart always  -v nexus3:/stnexus3  --name nexus3 -e INSTALL4J_ADD_VM_PARAMS="-Xms2g -Xmx2g -XX:MaxDirectMemorySize=3g  -Djava.util.prefs.userRoot=/stnexus3" sonatype/nexus3

Kafka


docker run --name some-zookeeper --restart always -d zookeeper
docker run -d --restart always --link some-zookeeper:zookeeper -d application-that-uses-zookeeper --name kafka-manager -eZK_HOSTS=zookeeper kafkamanager/kafka-manager

Postgres

docker volume create postgres_data
docker run -d --name some-postgres -e POSTGRES_PASSWORD=mysecretpassword -p 5432:5432 -e PGDATA=/var/lib/postgresql/data/pgdata -v postgres_data:/var/lib/postgresql/data postgres

docker-compose.yaml

version: '2'
services:
  zookeeper:
    image: 'bitnami/zookeeper:latest'
    ports:
      - '2181:2181'
    environment:
      - ALLOW_ANONYMOUS_LOGIN=yes
  kafka:
    image: 'bitnami/kafka:latest'
    ports:
      - '9092:9092'
    environment:
      - KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181
      - ALLOW_PLAINTEXT_LISTENER=yes
TeamCity
docker run -d --restart always   -e SERVER_URL="http://teamcity-server-instance:8111"  \ 
    -v  /data/teamcity-docker/agent:/data/teamcity_agent/conf  \      
    jetbrains/teamcity-agent:2018.2.2-linux 
 
docker run -d --restart always  --name teamcity-server-instance  \
    -v  /data/teamcity-docker:/data/teamcity_server/datadir \
    -v /data/teamcity-docker/logs:/opt/teamcity/logs  \
    -p 8111:8111 \
    jetbrains/teamcity-server:2018.2.2

Portainer


docker volume create portainer_data
docker run --restart always -d -p 9000:9000 -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce:2.20.1