Skip to content

jusmundi/docker-pgclient

Repository files navigation

JusMundi docker image with postgresql client for backup

  1. connect postgresql db
  2. encrypt dump
  3. upload dump to ovh and scaleway

Table of contents

Backup

Create docker backup postgresql client image

Code is jusmundi/pgclient

sudo service docker restart
make build
export DOCKER_ORGANISATION=${DOCKER_ORGANISATION:-"jusmundi"}
docker build --network=host -t "${DOCKER_ORGANISATION}/pgclient:0.1.2" --squash .
docker run -ti "${DOCKER_ORGANISATION}/pgclient:0.1.2" bash
docker tag ghcr.io/jusmundi/pgclient:${OCI_TAG:-"latest"} ghcr.io/jusmundi/pgclient:0.1.2
docker push "${DOCKER_ORGANISATION}/pgclient:0.1.2"

Image uploaded to jusmundi/pgclient

Check docker image quality

Docker dive

dive --ci --json docker-dive-stats.json "${DOCKER_ORGANISATION}/pgclient:0.1.2" 1>docker-dive.log 2>docker-dive-error.log

Docker linter

sudo npm install -g dockerfile_lint
dockerfile_lint --json --verbose --dockerfile Dockerfile
brew install hadolint
hadolint Dockerfile

mega-linter

npx mega-linter-runner --install
npx mega-linter-runner
npx v8r@latest .mega-linter.yml

Check secret

npx @secretlint/quick-start "**/*"

Check cspell

npx cspell "**/*.{txt,js,md}"

Update README.md

sudo npm install -g markdown-toc
markdown-toc README.md -i
markdown-toc CHANGELOG.md -i
sudo npm install -g markdown-link-check
markdown-link-check ./README.md