Skip to content

Instantly share code, notes, and snippets.

View dnaprawa's full-sized avatar

Damian Naprawa dnaprawa

View GitHub Profile

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)

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 08:45
Docker Desktop for Mac - bind mounts optimization
---
version: '3'
services:
myapp:
volumes:
- 'nfsmount:<CONATINER_PATH_HERE>'
volumes:
nfsmount:
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
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
#!/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
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 August 20, 2019 06:21 — forked from kekru/add CA cert on CentOS Debian Ubuntu.md
Add CA cert to local trust store on CentOS, 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 https://thewebsite.org