Skip to content

Instantly share code, notes, and snippets.

Avatar

Damian Naprawa dnaprawa

View GitHub Profile
View readme.md

CDW - 4x4h sessions in 06.2020

  • przed warsztatami upewnij się, że:
    • masz zainstalowanego i działającego (!) Dockera
      • sprawdź to za pomocą docker version lub docker container ls
  • Dobrze byłoby również mieć:
    • zainstalowanego git'a
    • jakiś edytor tekstu (polecane: VSCode)
View DevHours.md

06.06.2020, Capgemini DevHours - Docker w praktyce

  • przed warsztatami upewnij się, że:
    • masz zainstalowanego i działającego (!) Dockera
      • sprawdź to za pomocą docker version lub docker container ls
  • Dobrze byłoby również mieć:
    • zainstalowanego git'a
    • jakiś edytor tekstu (polecane: VSCode)
@dnaprawa
dnaprawa / docker-compose.override.yml
Last active May 23, 2020
Docker Desktop for Mac - bind mounts optimization
View docker-compose.override.yml
---
version: '3'
services:
myapp:
volumes:
- 'nfsmount:<CONATINER_PATH_HERE>'
volumes:
nfsmount:
View GitLab-Docker Image-AutoBuild.yml
image: docker:19.03.8
before_script:
- docker info
- docker login -u $REGISTRY_USER -p $REGISTRY_PASS $REGISTRY_URL
build:
stage: build
script:
- docker pull $REGISTRY_IMAGE:latest || true
View Backup, restore postgres in docker container
Backup:
docker exec -t -u postgres your-db-container pg_dumpall -c > dump_`date +%d-%m-%Y"_"%H_%M_%S`.sql
Restore:
cat your_dump.sql | docker exec -i your-db-container psql -U postgres
View clair_script.sh
#!/bin/bash
export DOCKER_USER=$1
export DOCKER_PASSWORD=$2
export CLAIR_ADDR=$3
export CLAIR_OUTPUT=$4
export CLAIR_THRESHOLD=$5
klar $6:$7
View docker-compose.yml
version: '3.2'
services:
visitbooker-postgres:
image: postgres:9.6
restart: always
ports:
- 5432:5432
environment:
POSTGRES_PASSWORD: <your_password_here>
@dnaprawa
dnaprawa / add CA cert on CentOS Debian Ubuntu.md
Created Aug 20, 2019 — forked from kekru/add CA cert on CentOS Debian Ubuntu.md
Add CA cert to local trust store on CentOS, Debian or Ubuntu
View add CA cert on CentOS Debian Ubuntu.md
  • 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 https://thewebsite.org