rasti.hil@hilandco.com +41 79 367-9677

How to view SSL certificate (PEM file) using openssl ?

openssl x509 -noout -text -in cert.pem

Docker Commands



System information


docker version

docker info

Pull images

docker pull <image>

Login to the docker hub repository

docker login

List images

docker images

Remove images

doceker rmi


Run Container

docker run -p 8080:80  <container>

Run Detached Mode

docker run -it -d  --name  <container> <image>:latest bash

List Containers

docker ps -a

Stop Container

docker stop <container>

Start Container

docker start <container>

Restart Container

docker restart <container>

Remove Containers

docker rm -f  <container>

Exec Bash

 docker exec -it <container> /bin/bash

Checking History

docker history  <container>

Low-level information

docker inspect  <container>

Copy Files

docker cp file.txt <container>:/tmp

Own Docker Images

docker commit <container>

docker build <dockerfile>

List Service 

docker service ls 

Update Service 


docker service update <service_name>

List Stack

docker stack ls

Remove Stack

docker stack rm <stack>

Deploy Stack 

docker stack deploy -c <docker-stack.yml> <stack>




Using MkDocs with git on Windows and Linux



MkDocs is  static site generator.

Windows  

choco install python
choco install pip

set https_proxy=http://localhost:3128

pip install --upgrade pip --user

pip install mkdocs
setx PATH "%PATH%;C:\Users\%USERNAME%\AppData\Roaming\Python\Python39\Scripts"


cd git _folder
mkdir docs
notepad  mkdocs.yml
site_name: My Docs
nav:
    - Home: readme.md
theme: readthedocs


mkdocs build --clean


git  commit -a -m "mkdocs updates"

git push

Linux

sudo su
export HTTPS_PROXY=http://localhost:3128
pip3 install mkdocs

pip3 install docker-compose

cd git _folder

mkdir docs

echo -e "
site_name: My Docs
nav:
    - Home: readme.md
theme: readthedocs" >mkdocs.yml

echo -e "# test" > docs/readme.md

mkdocs build --clean

git  commit -a -m "mkdocs updates"

git push