Sign inSign up

neilalcoseba/pgadmin4

By neilalcoseba

Updated about 5 years ago

pgAdmin4 (version 5.7) built for Raspberry PI (ARM Architecture).

Image
0

937

neilalcoseba/pgadmin4 repository overview

Unofficial Docker distribution of pgAdmin 4 dedicated solely for Raspberry Pi. Running Alpine Linux for lightweight OS best fit for the Raspberry Pi hardware.

Note : pgadmin4 version 6.xx cannot run on a raspberry pi 32-bit architecture.

Details

Build Version : pgadmin4-5.7

OS Version : alpine:3.12.7

Running

Example :

docker run -p 8080:80 \
    -e 'PGADMIN_DEFAULT_EMAIL=<EMAIL_ADDRESS>' \
    -e 'PGADMIN_DEFAULT_PASSWORD=<PASSWORD>' \
	-v <MOUNT_POINT>:/var/lib/pgadmin \
    -d pgadmin4:5.7

docker-compose.yml

version: "3.3"
   
services:
  db:
    image: neilalcoseba/pgadmin4:5.7
    container_name: pgadmin4
    restart: unless-stopped
    ports:
      - "80:80"
    volumes:
      - <MOUNT_POINT>:/var/lib/pgadmin
      - /etc/timezone:/etc/timezone:ro
      - /etc/localtime:/etc/localtime:ro
    environment:
      - PGADMIN_DISABLE_POSTFIX=True
      - PGADMIN_CONFIG_ENHANCED_COOKIE_PROTECTION=True
      - PGADMIN_DEFAULT_EMAIL=<EMAIL_ADDRESS>
      - PGADMIN_DEFAULT_PASSWORD=<PASSWORD>

Basic Kubernetes setting :

apiVersion: v1
kind: Pod
metadata:
    name: pgadmin4
    labels:
       app: pgadmin4
       tier: dev
spec:
    containers:
    - image: neilalcoseba/pgadmin4:5.7
      name: pgadmin4
      volumeMounts:
      - name: data
        mountPath: /var/lib/pgadmin
      env:
      - name: PGADMIN_DISABLE_POSTFIX
        value: 'true'
      - name: PGADMIN_DEFAULT_EMAIL
        value: <EMAIL_LOGIN>
      - name: PGADMIN_DEFAULT_PASSWORD
        value: <PASSWORD>
      ports:
      - containerPort: 80
        protocol: TCP

    volumes:
    - name: data
      hostPath:
         path: <PATH>
         type: Directory

---

apiVersion: v1
kind: Service
metadata:
  name: pgadmin4
spec:
  selector:
    app: pgadmin4
  ports:
    - protocol: TCP
      port: 80
      targetPort: 80

---

apiVersion: networking.k8s.io/v1
kind: Ingress
metadata:
  name: pgadmin4
  annotations:
    kubernetes.io/ingress.class: "traefik"
spec:
  rules:
  - http:
      paths:
      - path: /
        pathType: Exact
        backend:
          service:
             name: pgadmin4
             port:
                number: 80

Issues

ERROR  : Failed to create the directory /var/lib/pgadmin/sessions:
           [Errno 13] Permission denied: '/var/lib/pgadmin/sessions'

Solution :

Check on the mounted directory has read-write access. Execute this command :

$ cd /path/to/mount/directory
$ [sudo] chmod a+rw . -R

Reference

Container Deployment Parameters : https://www.pgadmin.org/docs/pgadmin4/latest/container_deployment.html

Source URL : https://github.com/postgres/pgadmin4.git

Tag summary

Content type

Image

Digest

Size

94.9 MB

Last updated

about 5 years ago

docker pull neilalcoseba/pgadmin4