Skip to content

Instantly share code, notes, and snippets.


Sergey Baranov barser

View GitHub Profile
barser /
Created May 11, 2022 — forked from styblope/
Enable TCP port 2375 for external connection to Docker

Enable TCP port 2375 for external connection to Docker

See this issue.
Docker best practise to Control and configure Docker with systemd.

  1. Create daemon.json file in /etc/docker:

     {"hosts": ["tcp://", "unix:///var/run/docker.sock"]}
barser /
Created Jan 16, 2022 — forked from 62mkv/
How to add a custom trusted certificate for making HTTP requests against external sites

Thoughts on how to add trusted store for connection to external sites that use that certificate for HTTPS

Option 1: global configuration

One can just provide the<path/to/store><password> options when running the Java application

However, this is not always possible (for example, when run in the cloud).

And if you want to use options from Spring Boot, be aware that with those you also have to provide key-store options as well. And, basically that would be an abuse, because this configuration is specifically for server side of your application.

barser /
Created Jan 16, 2022 — forked from hamburghammer/
Add CA cert to local trust store on CentOS, Manjaro, Debian or Ubuntu
  • Open a webpage that uses the CA with Firefox
  • Click the lock-icon in the addressbar -> show information -> show certificate
  • the certificate viewer will open
  • click details and choose the certificate of the certificate-chain, you want to import to CentOS
  • click "Export..." and save it as .crt file
  • Copy the .crt file to /etc/pki/ca-trust/source/anchors on your CentOS machine
  • run update-ca-trust extract
  • test it with wget

On Manjaro (arch) the location for the certificates is: /usr/share/ca-certificates/trust-source/anchors (low priority) or /etc/ca-certificates/trust-source/anchors/ (high priority) and the command to update is update-ca-trust extract.

barser /
Created Jan 16, 2022 — forked from BretFisher/
Docker Swarm Port Requirements, both Swarm Mode 1.12+ and Swarm Classic, plus AWS Security Group Style Tables

Docker Swarm Mode Ports

Starting with 1.12 in July 2016, Docker Swarm Mode is a built-in solution with built-in key/value store. Easier to get started, and fewer ports to configure.

Inbound Traffic for Swarm Management

  • TCP port 2377 for cluster management & raft sync communications
  • TCP and UDP port 7946 for "control plane" gossip discovery communication between all nodes
  • UDP port 4789 for "data plane" VXLAN overlay network traffic
  • IP Protocol 50 (ESP) if you plan on using overlay network with the encryption option

AWS Security Group Example

barser / 00-OozieWorkflowShellAction
Created Mar 3, 2021 — forked from airawat/00-OozieWorkflowShellAction
Oozie workflow with a shell action - with CaptureOutput Counts lines in a glob provided and writes the same to standard output. A subsequent email action emails the output of the shell action
View 00-OozieWorkflowShellAction
This gist includes components of a oozie workflow - scripts/code, sample data
and commands; Oozie actions covered: shell action, email action
Action 1: The shell action executes a shell script that does a line count for files in a
glob provided, and writes the line count to standard output
Action 2: The email action emails the output of action 1
Pictorial overview of job:
barser /
Created Jan 30, 2021 — forked from davideicardi/
Running Cloudera with Docker for development/test
View gist:ab558039237bf77742b9cca101e7982c
set langmap=ёйцукенгшщзхъфывапролджэячсмитьбюЁЙЦУКЕНГШЩЗХЪФЫВАПРОЛДЖЭЯЧСМИТЬБЮ;`qwertyuiop[]asdfghjkl\\;'zxcvbnm\\,.~QWERTYUIOP{}ASDFGHJKL:\\"ZXCVBNM<>
nmap Ж :
" yank
nmap Н Y
nmap з p
nmap ф a
nmap щ o
nmap г u
nmap З P
barser / start_docker_registry.bash
Created Jul 8, 2017 — forked from PieterScheffers/start_docker_registry.bash
Start docker registry with letsencrypt certificates (Linux Ubuntu)
View start_docker_registry.bash
#!/usr/bin/env bash
# install docker
# install docker-compose
# install letsencrypt