Docker le tsohle, tsohle, tsohle

TL; DR: Tataiso ea kakaretso ea ho bapisa meralo ea ho tsamaisa lits'ebetso ka lijaneng. Bokhoni ba Docker le lits'ebetso tse ling tse ts'oanang li tla nahanoa.

Docker le tsohle, tsohle, tsohle

Histori e nyenyane ea moo tsohle li tsoang teng

История

Mokhoa oa pele o tsebahalang oa ho arola kopo ke chroot. Pitso ea sistimi ea lebitso le le leng e fana ka phetoho ho directory ea motso - ka hona e fana ka phihlello ea lenaneo le e bitsitseng, phihlello ea lifaele feela ka har'a bukana ena. Empa haeba lenaneo le fuoa litokelo tsa superuser ka hare, le ka khona "ho phonyoha" ho tswa ho chroot le ho fumana mokhoa oa ho sebetsa ka sehloohong. Hape, ntle le ho fetola mohloli oa metso, lisebelisoa tse ling (RAM, processor), hammoho le ho fihlella marang-rang, ha li na moeli.

Tsela e latelang ke ho qala tsamaiso e feletseng ea ts'ebetso ka har'a setshelo, ho sebelisa mekhoa ea kernel ea tsamaiso. Mokhoa ona o bitsoa ka tsela e fapaneng lits'ebetsong tse fapaneng tsa ts'ebetso, empa moelelo o ts'oana - o tsamaisa lits'ebetso tse 'maloa tse ikemetseng tsa ts'ebetso, e' ngoe le e 'ngoe ea tsona e tsamaeang ka kernel e tsamaisang sistimi e kholo ea ts'ebetso. Sena se kenyelletsa Literonko tsa FreeBSD, Libaka tsa Solaris, OpenVZ, le LXC bakeng sa Linux. Ho itšehla thajana ha ho fanoe feela bakeng sa sebaka sa disk, empa le bakeng sa lisebelisoa tse ling, haholo-holo, setshelo se seng le se seng se ka ba le lithibelo ho nako ea processor, RAM, marang-rang a marang-rang. Ha ho bapisoa le chroot, ho thata ho tlohela setshelo, kaha superuser ka setshelo e na le monyetla oa ho kena feela ka hare ho setshelo, leha ho le joalo, ka lebaka la tlhokahalo ea ho boloka tsamaiso ea ts'ebetso ka har'a setshelo ho fihlela joale le tšebeliso ea kernel ea khale. Liphetolelo (tse sebetsang bakeng sa Linux, ho isa tekanyong e fokolang ea FreeBSD), ho na le monyetla oa ho "phunya" mokhoa oa ho itšehla thajana oa kernel le ho fihlella sistimi e kholo ea ts'ebetso.

Sebakeng sa ho qala sistimi e felletseng ea ts'ebetso ka sejaneng (e nang le sistimi ea ho qala, mookameli oa sephutheloana, joalo-joalo), lits'ebetso li ka hlahisoa hanghang, ntho ea mantlha ke ho fana ka lits'ebetso ka monyetla ona (ho ba teng ha lilaebrari tse hlokahalang le lifaele tse ling). Mohopolo ona o sebelitse e le motheo oa ts'ebeliso ea lisebelisoa tse kentsoeng, moemeli ea hlahelletseng le ea tsebahalang haholo oa Docker. Ha ho bapisoa le litsamaiso tse fetileng, mekhoa e mengata ea ho itšehla thajana, hammoho le ts'ehetso e hahiloeng bakeng sa marang-rang pakeng tsa lijana le boemo ba kopo ka har'a setshelo, ho ile ha fella ka bokhoni ba ho haha ​​​​tikoloho e le 'ngoe e akaretsang ho tsoa ho palo e kholo ea li-server tse tsamaisang lijana - ntle le ts'ebeliso e ntle. tlhokahalo ea tsamaiso ea lisebelisoa tsa matsoho.

Docker

Docker ke software e tsebahalang ka ho fetesisa ea lisebelisoa. E ngotsoe ka puo ea Go, e sebelisa bokhoni bo tloaelehileng ba Linux kernel - lihlopha, libaka tsa mabitso, bokhoni, joalo-joalo, hammoho le mekhoa ea lifaele tsa Aufs le tse ling tse tšoanang ho boloka sebaka sa disk.

Docker le tsohle, tsohle, tsohle
Mohloli: wikimedia

mehaho

Pele ho mofuta oa 1.11, Docker e ne e sebetsa e le ts'ebeletso e le 'ngoe e neng e etsa lits'ebetso tsohle ka lijana: ho jarolla linepe bakeng sa lijana, ho qala lijana, ho sebetsana le likopo tsa API. Ho tloha ka mofuta oa 1.11, Docker e arotsoe likarolo tse 'maloa tse sebelisanang: e kentsoeng, ho sebetsana le potoloho eohle ea bophelo ba lijana (kabo ea sebaka sa disk, ho jarolla litšoantšo, marang-rang, ho qala, ho kenya le ho lekola boemo ba lijana) le runC. , linako tsa ho sebetsa tsa setshelo, tse ipapisitseng le ts'ebeliso ea lihlopha le likarolo tse ling tsa kernel ea Linux. Ts'ebeletso ea li-docker ka boeona e ntse e le teng, empa joale e sebetsa feela ho sebetsana le likopo tsa API tse phatlalalitsoeng ho tse kentsoeng.

Docker le tsohle, tsohle, tsohle

Ho kenya le ho hlophisa

Tsela eo ke e ratang ka ho fetisisa ea ho kenya docker ke mochine oa li-docker, oo, ntle le ho kenya le ho lokisa docker ka ho toba ho li-server tse hole (ho kenyeletsoa le maru a fapaneng), o u lumella ho sebetsa le litsamaiso tsa lifaele tsa li-server tse hole, hape o ka tsamaisa litaelo tse fapaneng.

Leha ho le joalo, ho tloha ka 2018, morero ona ha o so ka o ntlafatsoa, ​​kahoo re tla o kenya ka tsela e tloaelehileng bakeng sa liphallelo tse ngata tsa Linux - ka ho eketsa polokelo le ho kenya liphutheloana tse hlokahalang.

Mokhoa ona o boetse o sebelisetsoa ho kenya mochine o ikemetseng, mohlala, ho sebelisa Ansible kapa mekhoa e meng e tšoanang, empa nke ke ka e nka sehloohong sena.

Ho kenya ho tla etsoa ho Centos 7, ke tla sebelisa mochine oa sebele joaloka seva, ho kenya, ho tsamaisa litaelo tse ka tlase:

# yum install -y yum-utils
# yum-config-manager --add-repo https://download.docker.com/linux/centos/docker-ce.repo
# yum install docker-ce docker-ce-cli containerd.io

Kamora ho kenya, o hloka ho qala ts'ebeletso, o e kenye ka autoload:

# systemctl enable docker
# systemctl start docker
# firewall-cmd --zone=public --add-port=2377/tcp --permanent

Ntle le moo, o ka theha sehlopha sa docker, seo basebelisi ba sona ba tla khona ho sebetsa le docker ntle le sudo, ho theha ho rema lifate, ho nolofalletsa phihlello ea API ho tsoa kantle, 'me u seke oa lebala ho hlophisa firewall ka nepo (ntho e ngoe le e ngoe e sa lumelloeng). e thibetsoe mehlaleng e ka holimo le ka tlase - ke siile sena bakeng sa bonolo le ho hlaka), empa nke ke ka kena ka botlalo mona.

Likarolo tse ling

Ntle le mochini oa docker o kaholimo, ho boetse ho na le ngoliso ea li-docker, sesebelisoa sa ho boloka litšoantšo bakeng sa lijana, hammoho le docker compose - sesebelisoa sa ho tsamaisa lits'ebetso ka lijaneng, lifaele tsa YAML li sebelisoa ho aha le ho hlophisa lijana le lintho tse ling tse amanang le tsona (mohlala, marang-rang, mekhoa e tsitsitseng ea lifaele bakeng sa ho boloka data).

E ka boela ea sebelisoa ho hlophisa lipeipi bakeng sa CICD. Ntho e 'ngoe e thahasellisang ke ho sebetsa ka mokhoa oa lihlopha, seo ho thoeng ke mokhoa oa "swarm" (pele phetolelo ea 1.12 e ne e tsejoa e le "docker swarm"), e leng se u lumellang hore u bokelle mohaho o le mong ho tloha ho li-server tse 'maloa ho tsamaisa lijana. Ho na le ts'ehetso bakeng sa marang-rang a marang-rang holim'a li-server tsohle, ho na le tekanyo ea mojaro e kentsoeng, hammoho le ts'ehetso ea liphiri tsa lijana.

Lifaele tsa YAML tse tsoang ho docker compose li ka sebelisoa bakeng sa lihlopha tse joalo tse nang le liphetoho tse nyane, li iketsetsa ka botlalo tlhokomelo ea lihlopha tse nyane le tse mahareng bakeng sa merero e fapaneng. Bakeng sa lihlopha tse kholo, Kubernetes e molemo ka ho fetisisa hobane litšenyehelo tsa tlhokomelo ea mefuta e mengata li ka feta tsa Kubernetes. Ntle le runC, joalo ka tikoloho ea ts'ebetso ea lijana, o ka kenya, mohlala Lijana tsa Kata

Ho sebetsa le Docker

Kamora ho kenya le ho hlophisoa, re tla leka ho haha ​​​​sehlopha seo ho sona re tla romela GitLab le Docker Registry bakeng sa sehlopha sa nts'etsopele. Joaloka li-server, ke tla sebelisa mechine e meraro ea sebele, eo ho eona ke tla sebelisa GlusterFS e ajoang FS, ke tla e sebelisa e le polokelo ea li-docker, ka mohlala, ho tsamaisa phetolelo e sa sireletsehang ea registry ea docker. Likarolo tsa bohlokoa tse lokelang ho tsamaisoa: Registry ea Docker, Postgresql, Redis, GitLab ka tšehetso bakeng sa GitLab Runner holim'a Swarm. Postgresql e tla hlahisoa ka lihlopha Stolon, kahoo ha ho hlokahale hore u sebelise GlusterFS ho boloka data ea Postgresql. Lintlha tse ling tsa bohlokoa li tla bolokoa ho GlusterFS.

Ho kenya GlusterFS ho li-server tsohle (li bitsoa node1, node2, node3), o hloka ho kenya liphutheloana, ho nolofalletsa firewall, ho etsa li-directory tse hlokahalang:

# yum -y install centos-release-gluster7
# yum -y install glusterfs-server
# systemctl enable glusterd
# systemctl start glusterd
# firewall-cmd --add-service=glusterfs --permanent
# firewall-cmd --reload
# mkdir -p /srv/gluster
# mkdir -p /srv/docker
# echo "$(hostname):/docker /srv/docker glusterfs defaults,_netdev 0 0" >> /etc/fstab

Kamora ho kenya, mosebetsi oa ho lokisa GlusterFS o tlameha ho tsoela pele ho tloha node e le 'ngoe, mohlala node1:

# gluster peer probe node2
# gluster peer probe node3
# gluster volume create docker replica 3 node1:/srv/gluster node2:/srv/gluster node3:/srv/gluster force
# gluster volume start docker

Ebe o hloka ho phahamisa molumo o hlahisoang (taelo e tlameha ho etsoa ho li-server tsohle):

# mount /srv/docker

Mokhoa oa Swarm o hlophisitsoe ho e 'ngoe ea li-server, e tla ba Moeta-pele, ba bang kaofela ba tla tlameha ho kena sehlopheng, kahoo sephetho sa ho tsamaisa taelo ho seva sa pele se tla hloka ho kopitsoa le ho etsoa ho tse ling kaofela.

Setupo sa sehlopha sa pele, ke tsamaisa taelo ho node1:

# docker swarm init
Swarm initialized: current node (a5jpfrh5uvo7svzz1ajduokyq) is now a manager.

To add a worker to this swarm, run the following command:

    docker swarm join --token SWMTKN-1-0c5mf7mvzc7o7vjk0wngno2dy70xs95tovfxbv4tqt9280toku-863hyosdlzvd76trfptd4xnzd xx.xx.xx.xx:2377

To add a manager to this swarm, run 'docker swarm join-token manager' and follow the instructions.
# docker swarm join-token manager

Kopitsa sephetho sa taelo ea bobeli, phethisa ho node2 le node3:

# docker swarm join --token SWMTKN-x-xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx-xxxxxxxxx xx.xx.xx.xx:2377
This node joined a swarm as a manager.

Mothating ona, tlhophiso ea pele ea li-server e phethiloe, a re tsoeleng pele ho theha lits'ebeletso; litaelo tse tla phethoa li tla hlahisoa ho tloha node1, ntle le haeba ho boletsoe ka tsela e 'ngoe.

Pele ho tsohle, ha re theheng marang-rang bakeng sa lijana:

# docker network create --driver=overlay etcd
# docker network create --driver=overlay pgsql
# docker network create --driver=overlay redis
# docker network create --driver=overlay traefik
# docker network create --driver=overlay gitlab

Ebe re tšoaea li-server, sena sea hlokahala ho tlama lits'ebeletso tse ling ho li-server:

# docker node update --label-add nodename=node1 node1
# docker node update --label-add nodename=node2 node2
# docker node update --label-add nodename=node3 node3

Ka mor'a moo, re theha li-directory bakeng sa ho boloka lintlha tsa etcd, polokelo ea KV, e hlokahalang bakeng sa Traefik le Stolon. Joalo ka Postgresql, tsena e tla ba lijana tse tlamelletsoeng ho li-server, kahoo re tsamaisa taelo ena ho li-server tsohle:

# mkdir -p /srv/etcd

Ka mor'a moo, theha faele ho lokisa etcd le ho e sebelisa:

00etcd.yml

version: '3.7'

services:
  etcd1:
    image: quay.io/coreos/etcd:latest
    hostname: etcd1
    command:
      - etcd
      - --name=etcd1
      - --data-dir=/data.etcd
      - --advertise-client-urls=http://etcd1:2379
      - --listen-client-urls=http://0.0.0.0:2379
      - --initial-advertise-peer-urls=http://etcd1:2380
      - --listen-peer-urls=http://0.0.0.0:2380
      - --initial-cluster=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380
      - --initial-cluster-state=new
      - --initial-cluster-token=etcd-cluster
    networks:
      - etcd
    volumes:
      - etcd1vol:/data.etcd
    deploy:
      replicas: 1
      placement:
        constraints: [node.labels.nodename == node1]
  etcd2:
    image: quay.io/coreos/etcd:latest
    hostname: etcd2
    command:
      - etcd
      - --name=etcd2
      - --data-dir=/data.etcd
      - --advertise-client-urls=http://etcd2:2379
      - --listen-client-urls=http://0.0.0.0:2379
      - --initial-advertise-peer-urls=http://etcd2:2380
      - --listen-peer-urls=http://0.0.0.0:2380
      - --initial-cluster=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380
      - --initial-cluster-state=new
      - --initial-cluster-token=etcd-cluster
    networks:
      - etcd
    volumes:
      - etcd2vol:/data.etcd
    deploy:
      replicas: 1
      placement:
        constraints: [node.labels.nodename == node2]
  etcd3:
    image: quay.io/coreos/etcd:latest
    hostname: etcd3
    command:
      - etcd
      - --name=etcd3
      - --data-dir=/data.etcd
      - --advertise-client-urls=http://etcd3:2379
      - --listen-client-urls=http://0.0.0.0:2379
      - --initial-advertise-peer-urls=http://etcd3:2380
      - --listen-peer-urls=http://0.0.0.0:2380
      - --initial-cluster=etcd1=http://etcd1:2380,etcd2=http://etcd2:2380,etcd3=http://etcd3:2380
      - --initial-cluster-state=new
      - --initial-cluster-token=etcd-cluster
    networks:
      - etcd
    volumes:
      - etcd3vol:/data.etcd
    deploy:
      replicas: 1
      placement:
        constraints: [node.labels.nodename == node3]

volumes:
  etcd1vol:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "/srv/etcd"
  etcd2vol:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "/srv/etcd"
  etcd3vol:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "/srv/etcd"

networks:
  etcd:
    external: true

# docker stack deploy --compose-file 00etcd.yml etcd

Kamora nakoana, re hlahloba hore sehlopha sa etcd se tsohile:

# docker exec $(docker ps | awk '/etcd/ {print $1}')  etcdctl member list
ade526d28b1f92f7: name=etcd1 peerURLs=http://etcd1:2380 clientURLs=http://etcd1:2379 isLeader=false
bd388e7810915853: name=etcd3 peerURLs=http://etcd3:2380 clientURLs=http://etcd3:2379 isLeader=false
d282ac2ce600c1ce: name=etcd2 peerURLs=http://etcd2:2380 clientURLs=http://etcd2:2379 isLeader=true
# docker exec $(docker ps | awk '/etcd/ {print $1}')  etcdctl cluster-health
member ade526d28b1f92f7 is healthy: got healthy result from http://etcd1:2379
member bd388e7810915853 is healthy: got healthy result from http://etcd3:2379
member d282ac2ce600c1ce is healthy: got healthy result from http://etcd2:2379
cluster is healthy

Theha li-directory bakeng sa Postgresql, etsa taelo ho li-server tsohle:

# mkdir -p /srv/pgsql

E latelang, theha faele ho hlophisa Postgresql:

01pgsql.yml

version: '3.7'

services:
  pgsentinel:
    image: sorintlab/stolon:master-pg10
    command:
      - gosu
      - stolon
      - stolon-sentinel
      - --cluster-name=stolon-cluster
      - --store-backend=etcdv3
      - --store-endpoints=http://etcd1:2379,http://etcd2:2379,http://etcd3:2379
      - --log-level=debug
    networks:
      - etcd
      - pgsql
    deploy:
      replicas: 3
      update_config:
        parallelism: 1
        delay: 30s
        order: stop-first
        failure_action: pause
  pgkeeper1:
    image: sorintlab/stolon:master-pg10
    hostname: pgkeeper1
    command:
      - gosu
      - stolon
      - stolon-keeper
      - --pg-listen-address=pgkeeper1
      - --pg-repl-username=replica
      - --uid=pgkeeper1
      - --pg-su-username=postgres
      - --pg-su-passwordfile=/run/secrets/pgsql
      - --pg-repl-passwordfile=/run/secrets/pgsql_repl
      - --data-dir=/var/lib/postgresql/data
      - --cluster-name=stolon-cluster
      - --store-backend=etcdv3
      - --store-endpoints=http://etcd1:2379,http://etcd2:2379,http://etcd3:2379
    networks:
      - etcd
      - pgsql
    environment:
      - PGDATA=/var/lib/postgresql/data
    volumes:
      - pgkeeper1:/var/lib/postgresql/data
    secrets:
      - pgsql
      - pgsql_repl
    deploy:
      replicas: 1
      placement:
        constraints: [node.labels.nodename == node1]
  pgkeeper2:
    image: sorintlab/stolon:master-pg10
    hostname: pgkeeper2
    command:
      - gosu
      - stolon 
      - stolon-keeper
      - --pg-listen-address=pgkeeper2
      - --pg-repl-username=replica
      - --uid=pgkeeper2
      - --pg-su-username=postgres
      - --pg-su-passwordfile=/run/secrets/pgsql
      - --pg-repl-passwordfile=/run/secrets/pgsql_repl
      - --data-dir=/var/lib/postgresql/data
      - --cluster-name=stolon-cluster
      - --store-backend=etcdv3
      - --store-endpoints=http://etcd1:2379,http://etcd2:2379,http://etcd3:2379
    networks:
      - etcd
      - pgsql
    environment:
      - PGDATA=/var/lib/postgresql/data
    volumes:
      - pgkeeper2:/var/lib/postgresql/data
    secrets:
      - pgsql
      - pgsql_repl
    deploy:
      replicas: 1
      placement:
        constraints: [node.labels.nodename == node2]
  pgkeeper3:
    image: sorintlab/stolon:master-pg10
    hostname: pgkeeper3
    command:
      - gosu
      - stolon 
      - stolon-keeper
      - --pg-listen-address=pgkeeper3
      - --pg-repl-username=replica
      - --uid=pgkeeper3
      - --pg-su-username=postgres
      - --pg-su-passwordfile=/run/secrets/pgsql
      - --pg-repl-passwordfile=/run/secrets/pgsql_repl
      - --data-dir=/var/lib/postgresql/data
      - --cluster-name=stolon-cluster
      - --store-backend=etcdv3
      - --store-endpoints=http://etcd1:2379,http://etcd2:2379,http://etcd3:2379
    networks:
      - etcd
      - pgsql
    environment:
      - PGDATA=/var/lib/postgresql/data
    volumes:
      - pgkeeper3:/var/lib/postgresql/data
    secrets:
      - pgsql
      - pgsql_repl
    deploy:
      replicas: 1
      placement:
        constraints: [node.labels.nodename == node3]
  postgresql:
    image: sorintlab/stolon:master-pg10
    command: gosu stolon stolon-proxy --listen-address 0.0.0.0 --cluster-name stolon-cluster --store-backend=etcdv3 --store-endpoints http://etcd1:2379,http://etcd2:2379,http://etcd3:2379
    networks:
      - etcd
      - pgsql
    deploy:
      replicas: 3
      update_config:
        parallelism: 1
        delay: 30s
        order: stop-first
        failure_action: rollback

volumes:
  pgkeeper1:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "/srv/pgsql"
  pgkeeper2:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "/srv/pgsql"
  pgkeeper3:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "/srv/pgsql"

secrets:
  pgsql:
    file: "/srv/docker/postgres"
  pgsql_repl:
    file: "/srv/docker/replica"

networks:
  etcd:
    external: true
  pgsql:
    external: true

Re hlahisa liphiri, sebelisa faele:

# </dev/urandom tr -dc 234567890qwertyuopasdfghjkzxcvbnmQWERTYUPASDFGHKLZXCVBNM | head -c $(((RANDOM%3)+15)) > /srv/docker/replica
# </dev/urandom tr -dc 234567890qwertyuopasdfghjkzxcvbnmQWERTYUPASDFGHKLZXCVBNM | head -c $(((RANDOM%3)+15)) > /srv/docker/postgres
# docker stack deploy --compose-file 01pgsql.yml pgsql

Nako hamorao (sheba tlhahiso ea taelo tšebeletso ea docker lshore lits'ebeletso tsohle li tsohile) qala sehlopha sa Postgresql:

# docker exec $(docker ps | awk '/pgkeeper/ {print $1}') stolonctl --cluster-name=stolon-cluster --store-backend=etcdv3 --store-endpoints=http://etcd1:2379,http://etcd2:2379,http://etcd3:2379 init

Ho lekola boitokisetso ba sehlopha sa Postgresql:

# docker exec $(docker ps | awk '/pgkeeper/ {print $1}') stolonctl --cluster-name=stolon-cluster --store-backend=etcdv3 --store-endpoints=http://etcd1:2379,http://etcd2:2379,http://etcd3:2379 status
=== Active sentinels ===

ID      LEADER
26baa11d    false
74e98768    false
a8cb002b    true

=== Active proxies ===

ID
4d233826
9f562f3b
b0c79ff1

=== Keepers ===

UID     HEALTHY PG LISTENADDRESS    PG HEALTHY  PG WANTEDGENERATION PG CURRENTGENERATION
pgkeeper1   true    pgkeeper1:5432         true     2           2
pgkeeper2   true    pgkeeper2:5432          true            2                   2
pgkeeper3   true    pgkeeper3:5432          true            3                   3

=== Cluster Info ===

Master Keeper: pgkeeper3

===== Keepers/DB tree =====

pgkeeper3 (master)
├─pgkeeper2
└─pgkeeper1

Re lokisa traefik ho bula phihlello ea lijana ho tsoa kantle:

03traefik.yml

version: '3.7'

services:
  traefik:
    image: traefik:latest
    command: >
      --log.level=INFO
      --providers.docker=true
      --entryPoints.web.address=:80
      --providers.providersThrottleDuration=2
      --providers.docker.watch=true
      --providers.docker.swarmMode=true
      --providers.docker.swarmModeRefreshSeconds=15s
      --providers.docker.exposedbydefault=false
      --accessLog.bufferingSize=0
      --api=true
      --api.dashboard=true
      --api.insecure=true
    networks:
      - traefik
    ports:
      - 80:80
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    deploy:
      replicas: 3
      placement:
        constraints:
          - node.role == manager
        preferences:
          - spread: node.id
      labels:
        - traefik.enable=true
        - traefik.http.routers.traefik.rule=Host(`traefik.example.com`)
        - traefik.http.services.traefik.loadbalancer.server.port=8080
        - traefik.docker.network=traefik

networks:
  traefik:
    external: true

# docker stack deploy --compose-file 03traefik.yml traefik

Re qala Redis Cluster, ho etsa sena re theha bukana ea polokelo libakeng tsohle:

# mkdir -p /srv/redis

05redis.yml

version: '3.7'

services:
  redis-master:
    image: 'bitnami/redis:latest'
    networks:
      - redis
    ports:
      - '6379:6379'
    environment:
      - REDIS_REPLICATION_MODE=master
      - REDIS_PASSWORD=xxxxxxxxxxx
    deploy:
      mode: global
      restart_policy:
        condition: any
    volumes:
      - 'redis:/opt/bitnami/redis/etc/'

  redis-replica:
    image: 'bitnami/redis:latest'
    networks:
      - redis
    ports:
      - '6379'
    depends_on:
      - redis-master
    environment:
      - REDIS_REPLICATION_MODE=slave
      - REDIS_MASTER_HOST=redis-master
      - REDIS_MASTER_PORT_NUMBER=6379
      - REDIS_MASTER_PASSWORD=xxxxxxxxxxx
      - REDIS_PASSWORD=xxxxxxxxxxx
    deploy:
      mode: replicated
      replicas: 3
      update_config:
        parallelism: 1
        delay: 10s
      restart_policy:
        condition: any

  redis-sentinel:
    image: 'bitnami/redis:latest'
    networks:
      - redis
    ports:
      - '16379'
    depends_on:
      - redis-master
      - redis-replica
    entrypoint: |
      bash -c 'bash -s <<EOF
      "/bin/bash" -c "cat <<EOF > /opt/bitnami/redis/etc/sentinel.conf
      port 16379
      dir /tmp
      sentinel monitor master-node redis-master 6379 2
      sentinel down-after-milliseconds master-node 5000
      sentinel parallel-syncs master-node 1
      sentinel failover-timeout master-node 5000
      sentinel auth-pass master-node xxxxxxxxxxx
      sentinel announce-ip redis-sentinel
      sentinel announce-port 16379
      EOF"
      "/bin/bash" -c "redis-sentinel /opt/bitnami/redis/etc/sentinel.conf"
      EOF'
    deploy:
      mode: global
      restart_policy:
        condition: any

volumes:
  redis:
    driver: local
    driver_opts:
      type: 'none'
      o: 'bind'
      device: "/srv/redis"

networks:
  redis:
    external: true

# docker stack deploy --compose-file 05redis.yml redis

Kenya Registry ea Docker:

06registry.yml

version: '3.7'

services:
  registry:
    image: registry:2.6
    networks:
      - traefik
    volumes:
      - registry_data:/var/lib/registry
    deploy:
      replicas: 1
      placement:
        constraints: [node.role == manager]
      restart_policy:
        condition: on-failure
      labels:
        - traefik.enable=true
        - traefik.http.routers.registry.rule=Host(`registry.example.com`)
        - traefik.http.services.registry.loadbalancer.server.port=5000
        - traefik.docker.network=traefik

volumes:
  registry_data:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "/srv/docker/registry"

networks:
  traefik:
    external: true

# mkdir /srv/docker/registry
# docker stack deploy --compose-file 06registry.yml registry

'Me qetellong - GitLab:

08gitlab-runner.yml

version: '3.7'

services:
  gitlab:
    image: gitlab/gitlab-ce:latest
    networks:
      - pgsql
      - redis
      - traefik
      - gitlab
    ports:
      - 22222:22
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        postgresql['enable'] = false
        redis['enable'] = false
        gitlab_rails['registry_enabled'] = false
        gitlab_rails['db_username'] = "gitlab"
        gitlab_rails['db_password'] = "XXXXXXXXXXX"
        gitlab_rails['db_host'] = "postgresql"
        gitlab_rails['db_port'] = "5432"
        gitlab_rails['db_database'] = "gitlab"
        gitlab_rails['db_adapter'] = 'postgresql'
        gitlab_rails['db_encoding'] = 'utf8'
        gitlab_rails['redis_host'] = 'redis-master'
        gitlab_rails['redis_port'] = '6379'
        gitlab_rails['redis_password'] = 'xxxxxxxxxxx'
        gitlab_rails['smtp_enable'] = true
        gitlab_rails['smtp_address'] = "smtp.yandex.ru"
        gitlab_rails['smtp_port'] = 465
        gitlab_rails['smtp_user_name'] = "[email protected]"
        gitlab_rails['smtp_password'] = "xxxxxxxxx"
        gitlab_rails['smtp_domain'] = "example.com"
        gitlab_rails['gitlab_email_from'] = '[email protected]'
        gitlab_rails['smtp_authentication'] = "login"
        gitlab_rails['smtp_tls'] = true
        gitlab_rails['smtp_enable_starttls_auto'] = true
        gitlab_rails['smtp_openssl_verify_mode'] = 'peer'
        external_url 'http://gitlab.example.com/'
        gitlab_rails['gitlab_shell_ssh_port'] = 22222
    volumes:
      - gitlab_conf:/etc/gitlab
      - gitlab_logs:/var/log/gitlab
      - gitlab_data:/var/opt/gitlab
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints:
        - node.role == manager
      labels:
        - traefik.enable=true
        - traefik.http.routers.gitlab.rule=Host(`gitlab.example.com`)
        - traefik.http.services.gitlab.loadbalancer.server.port=80
        - traefik.docker.network=traefik
  gitlab-runner:
    image: gitlab/gitlab-runner:latest
    networks:
      - gitlab
    volumes:
      - gitlab_runner_conf:/etc/gitlab
      - /var/run/docker.sock:/var/run/docker.sock
    deploy:
      mode: replicated
      replicas: 1
      placement:
        constraints:
        - node.role == manager

volumes:
  gitlab_conf:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "/srv/docker/gitlab/conf"
  gitlab_logs:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "/srv/docker/gitlab/logs"
  gitlab_data:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "/srv/docker/gitlab/data"
  gitlab_runner_conf:
    driver: local
    driver_opts:
      type: none
      o: bind
      device: "/srv/docker/gitlab/runner"

networks:
  pgsql:
    external: true
  redis:
    external: true
  traefik:
    external: true
  gitlab:
    external: true

# mkdir -p /srv/docker/gitlab/conf
# mkdir -p /srv/docker/gitlab/logs
# mkdir -p /srv/docker/gitlab/data
# mkdir -p /srv/docker/gitlab/runner
# docker stack deploy --compose-file 08gitlab-runner.yml gitlab

Boemo ba ho qetela ba sehlopha le litšebeletso:

# docker service ls
ID                  NAME                   MODE                REPLICAS            IMAGE                          PORTS
lef9n3m92buq        etcd_etcd1             replicated          1/1                 quay.io/coreos/etcd:latest
ij6uyyo792x5        etcd_etcd2             replicated          1/1                 quay.io/coreos/etcd:latest
fqttqpjgp6pp        etcd_etcd3             replicated          1/1                 quay.io/coreos/etcd:latest
hq5iyga28w33        gitlab_gitlab          replicated          1/1                 gitlab/gitlab-ce:latest        *:22222->22/tcp
dt7s6vs0q4qc        gitlab_gitlab-runner   replicated          1/1                 gitlab/gitlab-runner:latest
k7uoezno0h9n        pgsql_pgkeeper1        replicated          1/1                 sorintlab/stolon:master-pg10
cnrwul4r4nse        pgsql_pgkeeper2        replicated          1/1                 sorintlab/stolon:master-pg10
frflfnpty7tr        pgsql_pgkeeper3        replicated          1/1                 sorintlab/stolon:master-pg10
x7pqqchi52kq        pgsql_pgsentinel       replicated          3/3                 sorintlab/stolon:master-pg10
mwu2wl8fti4r        pgsql_postgresql       replicated          3/3                 sorintlab/stolon:master-pg10
9hkbe2vksbzb        redis_redis-master     global              3/3                 bitnami/redis:latest           *:6379->6379/tcp
l88zn8cla7dc        redis_redis-replica    replicated          3/3                 bitnami/redis:latest           *:30003->6379/tcp
1utp309xfmsy        redis_redis-sentinel   global              3/3                 bitnami/redis:latest           *:30002->16379/tcp
oteb824ylhyp        registry_registry      replicated          1/1                 registry:2.6
qovrah8nzzu8        traefik_traefik        replicated          3/3                 traefik:latest                 *:80->80/tcp, *:443->443/tcp

Ke eng hape e ka ntlafatsoang? Etsa bonnete ba hore u lokisa Traefik ho tsamaisa lijana holim'a https, eketsa tls encryption bakeng sa Postgresql le Redis. Empa ka kakaretso, e se e ka fuoa batho ba ntlafatsang joalo ka PoC. Ha re shebeng mekhoa e meng ea Docker.

podman

Enjene e 'ngoe e tsebahalang haholo ea ho tsamaisa lijana tse hlophisitsoeng ka li-pods (li-pods, lihlopha tsa lijana tse kentsoeng hammoho). Ho fapana le Docker, ha e hloke ts'ebeletso efe kapa efe ho tsamaisa lijana, mosebetsi oohle o etsoa ka laeborari ea libpod. E boetse e ngotsoe ho Go, e hloka nako ea ho sebetsa e lumellanang le OCI ho tsamaisa lijana tse kang runC.

Docker le tsohle, tsohle, tsohle

Ho sebetsa le Podman ka kakaretso ho tšoana le Docker, ho isa tekanyong eo u ka e etsang ka tsela ena (e boleloang ke ba bangata ba e lekileng, ho kenyelletsa le mongoli oa sengoloa sena):

$ alias docker=podman

'me u ka tsoela pele ho sebetsa. Ka kakaretso, boemo ba Podman bo thahasellisa haholo, hobane haeba liphetolelo tsa pele tsa Kubernetes li ne li sebetsa le Docker, joale ho tloha hoo e ka bang ka 2015, ka mor'a ho tiisa lefats'e la setshelo (OCI - Open Container Initiative) le ho arola Docker ka har'a setshelo le runC, mokhoa o mong oa Docker e ntse e ntlafatsoa hore e sebetse ho Kubernetes: CRI-O. Podman tabeng ena ke mokhoa o mong oa Docker, o hahiloeng holim'a melao-motheo ea Kubernetes, ho kenyelletsa le lihlopha tsa lijana, empa sepheo se seholo sa morero ke ho tsamaisa lijana tsa mokhoa oa Docker ntle le litšebeletso tse eketsehileng. Ka mabaka a totobetseng, ha ho na mokhoa oa ho tsuba, kaha bahlahisi ba bolela ka ho hlaka hore haeba u hloka sehlopha, nka Kubernetes.

bophirima

Ho kenya ho Centos 7, kenya feela sebaka sa polokelo ea Extras, ebe o kenya ntho e 'ngoe le e' ngoe ka taelo:

# yum -y install podman

Likarolo tse ling

Podman e ka hlahisa li-unit bakeng sa systemd, kahoo e rarolla bothata ba ho qala lijana ka mor'a hore seva se qale hape. Ho feta moo, systemd e phatlalalitsoe hore e sebetsa ka nepo joalo ka pid 1 ka sejaneng. Ho haha ​​​​lijana, ho na le sesebelisoa se arohaneng sa buildah, ho boetse ho na le lisebelisoa tsa motho oa boraro - li-analogues tsa docker-compose, tse hlahisang lifaele tsa tlhophiso tse lumellanang le Kubernetes, kahoo phetoho ho tloha Podman ho ea Kubernetes e bonolo ka hohle kamoo ho ka khonehang.

Ho sebetsa le Podman

Kaha ha ho na mokhoa oa ho sesa (re tlameha ho fetohela ho Kubernetes haeba ho hlokahala sehlopha), re tla e bokella ka lijaneng tse arohaneng.

Kenya podman-compose:

# yum -y install python3-pip
# pip3 install podman-compose

Sephetho sa config file bakeng sa podman se fapane hanyane, joalo ka mohlala re ile ra tlameha ho tsamaisa karolo e arohaneng ea meqolo ka kotloloho karolong ea lits'ebeletso.

gitlab-podman.yml

version: '3.7'

services:
  gitlab:
    image: gitlab/gitlab-ce:latest
    hostname: gitlab.example.com
    restart: unless-stopped
    environment:
      GITLAB_OMNIBUS_CONFIG: |
        gitlab_rails['gitlab_shell_ssh_port'] = 22222
    ports:
      - "80:80"
      - "22222:22"
    volumes:
      - /srv/podman/gitlab/conf:/etc/gitlab
      - /srv/podman/gitlab/data:/var/opt/gitlab
      - /srv/podman/gitlab/logs:/var/log/gitlab
    networks:
      - gitlab

  gitlab-runner:
    image: gitlab/gitlab-runner:alpine
    restart: unless-stopped
    depends_on:
      - gitlab
    volumes:
      - /srv/podman/gitlab/runner:/etc/gitlab-runner
      - /var/run/docker.sock:/var/run/docker.sock
    networks:
      - gitlab

networks:
  gitlab:

# podman-compose -f gitlab-runner.yml -d up

Sephetho sa mosebetsi:

# podman ps
CONTAINER ID  IMAGE                                  COMMAND               CREATED             STATUS                 PORTS                                      NAMES
da53da946c01  docker.io/gitlab/gitlab-runner:alpine  run --user=gitlab...  About a minute ago  Up About a minute ago  0.0.0.0:22222->22/tcp, 0.0.0.0:80->80/tcp  root_gitlab-runner_1
781c0103c94a  docker.io/gitlab/gitlab-ce:latest      /assets/wrapper       About a minute ago  Up About a minute ago  0.0.0.0:22222->22/tcp, 0.0.0.0:80->80/tcp  root_gitlab_1

Ha re boneng hore na e tla hlahisa eng bakeng sa systemd le kubernetes, bakeng sa sena re hloka ho fumana lebitso kapa id ea pod:

# podman pod ls
POD ID         NAME   STATUS    CREATED          # OF CONTAINERS   INFRA ID
71fc2b2a5c63   root   Running   11 minutes ago   3                 db40ab8bf84b

Kubernetes:

# podman generate kube 71fc2b2a5c63
# Generation of Kubernetes YAML is still under development!
#
# Save the output of this file and use kubectl create -f to import
# it into Kubernetes.
#
# Created with podman-1.6.4
apiVersion: v1
kind: Pod
metadata:
  creationTimestamp: "2020-07-29T19:22:40Z"
  labels:
    app: root
  name: root
spec:
  containers:
  - command:
    - /assets/wrapper
    env:
    - name: PATH
      value: /opt/gitlab/embedded/bin:/opt/gitlab/bin:/assets:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    - name: TERM
      value: xterm
    - name: HOSTNAME
      value: gitlab.example.com
    - name: container
      value: podman
    - name: GITLAB_OMNIBUS_CONFIG
      value: |
        gitlab_rails['gitlab_shell_ssh_port'] = 22222
    - name: LANG
      value: C.UTF-8
    image: docker.io/gitlab/gitlab-ce:latest
    name: rootgitlab1
    ports:
    - containerPort: 22
      hostPort: 22222
      protocol: TCP
    - containerPort: 80
      hostPort: 80
      protocol: TCP
    resources: {}
    securityContext:
      allowPrivilegeEscalation: true
      capabilities: {}
      privileged: false
      readOnlyRootFilesystem: false
    volumeMounts:
    - mountPath: /var/opt/gitlab
      name: srv-podman-gitlab-data
    - mountPath: /var/log/gitlab
      name: srv-podman-gitlab-logs
    - mountPath: /etc/gitlab
      name: srv-podman-gitlab-conf
    workingDir: /
  - command:
    - run
    - --user=gitlab-runner
    - --working-directory=/home/gitlab-runner
    env:
    - name: PATH
      value: /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
    - name: TERM
      value: xterm
    - name: HOSTNAME
    - name: container
      value: podman
    image: docker.io/gitlab/gitlab-runner:alpine
    name: rootgitlab-runner1
    resources: {}
    securityContext:
      allowPrivilegeEscalation: true
      capabilities: {}
      privileged: false
      readOnlyRootFilesystem: false
    volumeMounts:
    - mountPath: /etc/gitlab-runner
      name: srv-podman-gitlab-runner
    - mountPath: /var/run/docker.sock
      name: var-run-docker.sock
    workingDir: /
  volumes:
  - hostPath:
      path: /srv/podman/gitlab/runner
      type: Directory
    name: srv-podman-gitlab-runner
  - hostPath:
      path: /var/run/docker.sock
      type: File
    name: var-run-docker.sock
  - hostPath:
      path: /srv/podman/gitlab/data
      type: Directory
    name: srv-podman-gitlab-data
  - hostPath:
      path: /srv/podman/gitlab/logs
      type: Directory
    name: srv-podman-gitlab-logs
  - hostPath:
      path: /srv/podman/gitlab/conf
      type: Directory
    name: srv-podman-gitlab-conf
status: {}

systemd:

# podman generate systemd 71fc2b2a5c63
# pod-71fc2b2a5c6346f0c1c86a2dc45dbe78fa192ea02aac001eb8347ccb8c043c26.service
# autogenerated by Podman 1.6.4
# Thu Jul 29 15:23:28 EDT 2020

[Unit]
Description=Podman pod-71fc2b2a5c6346f0c1c86a2dc45dbe78fa192ea02aac001eb8347ccb8c043c26.service
Documentation=man:podman-generate-systemd(1)
Requires=container-781c0103c94aaa113c17c58d05ddabf8df4bf39707b664abcf17ed2ceff467d3.service container-da53da946c01449f500aa5296d9ea6376f751948b17ca164df438b7df6607864.service
Before=container-781c0103c94aaa113c17c58d05ddabf8df4bf39707b664abcf17ed2ceff467d3.service container-da53da946c01449f500aa5296d9ea6376f751948b17ca164df438b7df6607864.service

[Service]
Restart=on-failure
ExecStart=/usr/bin/podman start db40ab8bf84bf35141159c26cb6e256b889c7a98c0418eee3c4aa683c14fccaa
ExecStop=/usr/bin/podman stop -t 10 db40ab8bf84bf35141159c26cb6e256b889c7a98c0418eee3c4aa683c14fccaa
KillMode=none
Type=forking
PIDFile=/var/run/containers/storage/overlay-containers/db40ab8bf84bf35141159c26cb6e256b889c7a98c0418eee3c4aa683c14fccaa/userdata/conmon.pid

[Install]
WantedBy=multi-user.target
# container-da53da946c01449f500aa5296d9ea6376f751948b17ca164df438b7df6607864.service
# autogenerated by Podman 1.6.4
# Thu Jul 29 15:23:28 EDT 2020

[Unit]
Description=Podman container-da53da946c01449f500aa5296d9ea6376f751948b17ca164df438b7df6607864.service
Documentation=man:podman-generate-systemd(1)
RefuseManualStart=yes
RefuseManualStop=yes
BindsTo=pod-71fc2b2a5c6346f0c1c86a2dc45dbe78fa192ea02aac001eb8347ccb8c043c26.service
After=pod-71fc2b2a5c6346f0c1c86a2dc45dbe78fa192ea02aac001eb8347ccb8c043c26.service

[Service]
Restart=on-failure
ExecStart=/usr/bin/podman start da53da946c01449f500aa5296d9ea6376f751948b17ca164df438b7df6607864
ExecStop=/usr/bin/podman stop -t 10 da53da946c01449f500aa5296d9ea6376f751948b17ca164df438b7df6607864
KillMode=none
Type=forking
PIDFile=/var/run/containers/storage/overlay-containers/da53da946c01449f500aa5296d9ea6376f751948b17ca164df438b7df6607864/userdata/conmon.pid

[Install]
WantedBy=multi-user.target
# container-781c0103c94aaa113c17c58d05ddabf8df4bf39707b664abcf17ed2ceff467d3.service
# autogenerated by Podman 1.6.4
# Thu Jul 29 15:23:28 EDT 2020

[Unit]
Description=Podman container-781c0103c94aaa113c17c58d05ddabf8df4bf39707b664abcf17ed2ceff467d3.service
Documentation=man:podman-generate-systemd(1)
RefuseManualStart=yes
RefuseManualStop=yes
BindsTo=pod-71fc2b2a5c6346f0c1c86a2dc45dbe78fa192ea02aac001eb8347ccb8c043c26.service
After=pod-71fc2b2a5c6346f0c1c86a2dc45dbe78fa192ea02aac001eb8347ccb8c043c26.service

[Service]
Restart=on-failure
ExecStart=/usr/bin/podman start 781c0103c94aaa113c17c58d05ddabf8df4bf39707b664abcf17ed2ceff467d3
ExecStop=/usr/bin/podman stop -t 10 781c0103c94aaa113c17c58d05ddabf8df4bf39707b664abcf17ed2ceff467d3
KillMode=none
Type=forking
PIDFile=/var/run/containers/storage/overlay-containers/781c0103c94aaa113c17c58d05ddabf8df4bf39707b664abcf17ed2ceff467d3/userdata/conmon.pid

[Install]
WantedBy=multi-user.target

Ka bomalimabe, ntle le ho tsamaisa lijana, yuniti e hlahisitsoeng bakeng sa systemd ha e etse letho le leng (mohlala, ho hloekisa lijana tsa khale ha ts'ebeletso e joalo e qala hape), kahoo o tla tlameha ho eketsa lintho tse joalo ka bouena.

Ha e le hantle, Podman e lekane ho leka hore na lijana ke eng, ho fetisetsa litlhophiso tsa khale bakeng sa docker-compose, ebe u ea Kubernetes, haeba ho hlokahala, ka sehlopha, kapa u fumane mokhoa o bonolo oa ho sebelisa Docker.

rkt

Morero e ile polokelong hoo e ka bang likhoeli tse tšeletseng tse fetileng ka lebaka la hore RedHat e rekile, kahoo nke ke ka lula ho eona ka ho qaqileng haholoanyane. Ka kakaretso, e ile ea siea maikutlo a matle haholo, empa ha e bapisoa le Docker, le ho feta ho Podman, e shebahala e le motsoako. Ho ne ho boetse ho e-na le kabo ea CoreOS e hahiloeng holim'a rkt (le hoja qalong ba ne ba e-na le Docker), empa seo se ile sa fela ka mor'a ho reka RedHat.

Hlakola

Ho feta morero o le mong, eo mongoli oa eona a neng a batla ho haha ​​​​le ho tsamaisa lijana. Ho latela litokomane le khoutu, mongoli ha aa ka a latela litekanyetso, empa o ile a etsa qeto ea ho ngola ts'ebetsong ea hae, eo, ha e le hantle, ae entseng.

fumanoeng ke

Boemo ba Kubernetes bo thahasellisa haholo: ka lehlakoreng le leng, le Docker, o ka bokella sehlopha (ka mokhoa oa ho fofa), oo ka oona o ka tsamaisang libaka tsa tlhahiso bakeng sa bareki, sena ke 'nete haholo bakeng sa lihlopha tse nyenyane (batho ba 3-5). ), kapa ka kakaretso e nyenyane mojaro , kapa ho hloka takatso ea ho utloisisa mekhoa e rarahaneng ea ho theha Kubernetes, ho kenyeletsa le meroalo e phahameng.

Podman ha e fane ka tumellano e feletseng, empa e na le molemo o le mong oa bohlokoa - ho lumellana le Kubernetes, ho kenyelletsa le lisebelisoa tse eketsehileng (buildah le tse ling). Ka hona, ke tla atamela khetho ea sesebelisoa sa mosebetsi ka tsela e latelang: bakeng sa lihlopha tse nyenyane, kapa ka tekanyetso e fokolang - Docker (e nang le mokhoa o ka khonehang), bakeng sa ho iketsetsa setsi sa botho - metsoalle ea Podman, le bakeng sa batho ba bang kaofela. - Kubernetes.

Ha ke na bonnete ba hore boemo ba Docker bo ke ke ba fetoha nakong e tlang, ka mor'a tsohle, ke bo-pula-maliboho, 'me ba ntse ba leka-lekanya butle-butle mohato ka mohato, empa Podman, ka mefokolo eohle ea eona (e sebetsa feela Linux, ha ho na lihlopha, kopano. le liketso tse ling ke liqeto tsa motho oa boraro) bokamoso bo hlakile haholoanyane, kahoo ke mema bohle hore ba buisane ka liphuputso tsena ho litlhaloso.

PES Ka la 3 Phato re qala "Lenaneo la video la Dockermoo u ka ithutang ho eketsehileng ka mosebetsi oa hae. Re tla sekaseka lisebelisoa tsohle tsa eona: ho tloha lits'ebetsong tsa mantlha ho isa ho li-parameter tsa marang-rang, li-nuances tsa ho sebetsa le lits'ebetso tse fapaneng tsa ts'ebetso le lipuo tsa mananeo. U tla tloaelana le theknoloji mme u utloisise hore na u ka sebelisa Docker hokae le hore na u ka e sebelisa joang. Hape re tla arolelana linyeoe tsa mekhoa e metle.

Litsenyehelo tsa ho reka esale pele pele ho lokolloa: li-ruble tse 5000. Lenaneo la "Docker Video Course" le ka fumanoa leqepheng la thupelo.

Source: www.habr.com

Eketsa ka tlhaloso