Code Monkey home page Code Monkey logo

adminer's Introduction

Dockette / Nexus

🎁 Tiniest boxed dockerized Adminer (MySQL, PostgreSQL, SQLite, Mongo, Oracle) Dockerfiles. Database management in a single PHP file.

πŸ•Ή f3l1x.io | πŸ’» f3l1x | 🐦 @xf3l1x

Adminer


Prologue

There are few variants of this adminer image based:

  • full (mysql, pgsql, sqlite, mongo)
  • mysql (only)
  • pgsql (only)
  • mongo (only)
  • dg (custom)

Features

  • Alpine Linux (full, editor, df, mongo, mysql, postgres)
  • Debian Buster (oracle-11, oracle-12)
  • PHP 8 (concurrency via PHP cli workers)

Usage

docker run \
    --rm
    -p 8000:80
    dockette/adminer:dg

By default container is running with these settings, you can override it using environment variables.

  • MEMORY=256M (memory_limit)
  • UPLOAD=2048M (upload_max_filesize, post_max_size)
  • WORKERS=4 (concurrency)
docker run \
    --rm
    -p 8000:80
    -e MEMORY=512M
    -e UPLOAD=4096M
    dockette/adminer:dg

Versions

Image Technologies Size Docker Hub
dockette/adminer MySQL / PostgreSQL / MongoDB / Sqlite 12mb link
dockette/adminer:full MySQL / PostgreSQL / MongoDB / Sqlite 12mb link
dockette/adminer:mysql MySQL 9mb link
dockette/adminer:pgsql PostgreSQL 8mb link
dockette/adminer:mongo MongoDB 9mb link
dockette/adminer:dg MySQL / PostgreSQL / MongoDB / Sqlite 16mb link

dockette/adminer:dg

Customization for the best database management tool written in PHP, Adminer

You should take a look to the official github profile (https://github.com/dg/adminer-custom).

Adminer DG

Maintenance

Upgrade Adminer and Adminer Editor versions to X.Y.Z

ADMINER_VERSION=4.8.1 make update-versions

adminer's People

Contributors

cosandr avatar enumag avatar f3l1x avatar janmikes avatar keksa avatar landsman avatar mayli avatar sinacek avatar solcik avatar svasek avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

adminer's Issues

Feature request: Other Oracle versions?

I realize it's easy to say and likely really hard to execute. Can we support other Oracle versions? I see 11 & 12 as tags in Docker Hub. Could we add support for other Oracle versions like 19?

adminer-editor image uses an outdated version of the app

The adminer-editor Dockerfile indicates that ADMINER_EDITOR_VERSION=4.7.0 is being used. A newer version is available.

You should be able to use a similar command when updating the ADMINER_VERSION:

find . -type f -name Dockerfile -exec sed -i '' 's/ENV ADMINER_EDITOR_VERSION=.*/ENV ADMINER_EDITOR_VERSION=4.7.X/g' {} +

Alternatively, you could add the following lines to your Dockerfile to make it possible for consumers to set the version via docker build args:

ARG ADMINER_EDITOR_VERSION=4.7.5
ENV ADMINER_EDITOR_VERSION=${ADMINER_EDITOR_VERSION}

Error: /tini no souch file or directory

After deploying latest docker image of dg variant an error occured in our environment.

OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "/tini": stat /tini: no such file or directory: unknown

After further testing it is not limited to the dg variant but also full is not working. Maybe something to do with the absolute path of /tini?

ENTRYPOINT ["/tini", "--"]

It seems like the binary tini is not even present in the container.

╰─$ docker run \ 
    --rm \
    -it \
    dockette/adminer:dg sh
/srv # ls -l
total 520
-rw-rw-r--    1 root     root         32093 Feb 11 23:57 adminer.css
-rw-rw-r--    1 root     root        475730 Feb 11 23:57 adminer.php
-rw-rw-r--    1 root     root           236 Feb 11 23:57 composer.json
-rw-rw-r--    1 root     root          2117 Feb 11 23:57 index.php
drwxrwxr-x    2 root     root          4096 Mar 30 17:30 plugins
-rw-rw-r--    1 root     root          2094 Feb 11 23:57 readme.md
drwxrwxr-x    3 root     root          4096 Mar 30 17:30 static
/srv # /tini
sh: /tini: not found
/srv # which tini
/srv # apk add tini
fetch https://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
fetch https://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
fetch http://nl.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
(1/2) Upgrading php7-mysqli (7.4.16-r0 -> 7.4.22-r0)
(2/2) Installing tini (0.19.0-r0)
Executing busybox-1.33.0-r4.trigger
OK: 51 MiB in 40 packages
/srv # which tini
/sbin/tini

Missing ARM based CPU support

Hi, on ARM based cpus (M1 macbook for example) containers fails to start, due to incompatible architecture:

adminer_1  | standard_init_linux.go:219: exec user process caused: exec format error

There is easy solution for that when commands are under your control:

docker buildx create --use
docker buildx build --push --platform linux/arm/v7,linux/arm64/v8,linux/amd64 --tag your-username/multiarch-example:gitlab .

But as long as it seems there are automated builds, i am unsure how it could be done here, i just found this resource that might be helpful: https://github.com/ckulka/docker-multi-arch-example

PHP 7.4 multithreading

It should be fast and support concurrency.

PHP_CLI_SERVER_WORKERS=4 php -S 0.0.0.0:8000 adminer.php

Container takes a long time to stop

I'm using the dockette/adminer:dg image in the docker-compose.yml I have for development. It works fine, but when I stop the containers (2 postgres databases + adminer), adminer takes much longer to stop than the others (by several seconds). Any idea why this is the case? I would expect adminer to be a relatively light container compared to postgres.

Mongo: different login on php5 and php7

Hi,
with image dockette/adminer:full I'm not able connect to Mongo, because it returns Database does not support password..

I haven't allowed login without password.

I tried the same issue on version dockette/adminer:full-php5 and it works. I was not able find out how to fix it :/

Main problem is, that wrong connection doesn't throw exception.

I'm not sure if report it here or on the adminer repo.

Themes

Download more themes, setup them over ENV variable.

Add mention of alpine

Not sure how I came across this repo as I was querying my search with docker adminer alpine, turns out this is alpine based but there doesn't seem to be any mention of that in repo description or README.md?

Perhaps there isn't much reason or value to mention it these days? The repo does convey it's a tiny image for adminer along with table showing various sizes for variants.

Errors while building adminer-editor Dockerfile

The following errors occur when trying to build the adminer-editor Dockerfile using the command sudo docker build https://github.com/dockette/adminer.git#master:adminer-editor:

Step 1/9 : FROM alpine:edge
06:56:37.849 > edge: Pulling from library/alpine
06:56:39.007 > 7ea5c00be5c0: Pulling fs layer
06:56:42.305 > 7ea5c00be5c0: Verifying Checksum
06:56:42.365 > 7ea5c00be5c0: Download complete
06:56:43.069 > 7ea5c00be5c0: Pull complete
06:56:43.125 > Digest: sha256:fa00ece9a1a6902309239e7406cd1f37d8d9064dd04273e696ca5cbd4e962706
06:56:43.183 > Status: Downloaded newer image for alpine:edge
06:56:43.235 > ---> 13d22f83f248
06:56:43.282 > Step 2/9 : MAINTAINER Milan Sulc <[email protected]>
06:56:43.338 > ---> Running in 76f0ab959aa3
06:56:43.619 > Removing intermediate container 76f0ab959aa3
06:56:43.671 > ---> ad1908d212a9
06:56:43.714 > Step 3/9 : ENV ADMINER_EDITOR_VERSION=4.7.0
06:56:43.760 > ---> Running in 3065c2fc9e4a
06:56:44.039 > Removing intermediate container 3065c2fc9e4a
06:56:44.102 > ---> 2295a6367a89
06:56:44.154 > Step 4/9 : ENV MEMORY=256M
06:56:44.216 > ---> Running in 5f99caed845d
06:56:44.439 > Removing intermediate container 5f99caed845d
06:56:44.488 > ---> 276087a81dbf
06:56:44.538 > Step 5/9 : ENV UPLOAD=2048M
06:56:44.608 > ---> Running in 36e1dacb40e0
06:56:44.902 > Removing intermediate container 36e1dacb40e0
06:56:44.955 > ---> 0ef61e6a1bb0
06:56:45.002 > Step 6/9 : RUN echo '@testing http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories &&     apk update && apk upgrade 
&&     apk add         wget         ca-certificates         php7.1@testing         php7.1-session@testing         php7.1-mysqli@testing         php7.1-pgsql@testing         php7.1-mongodb@testing &&     wget https://github.com/vrana/adminer/releases/download/v$ADMINER_EDITOR_VERSION/editor-$ADMINER_EDITOR_VERSION.php -O /srv/index.php &&     apk del wget ca-certificates &&     rm -rf /var/cache/apk/*
06:56:45.092 > ---> Running in b09b921b17eb
06:56:46.634 > fetch http://dl-cdn.alpinelinux.org/alpine/edge/main/x86_64/APKINDEX.tar.gz
06:56:49.584 > fetch http://dl-cdn.alpinelinux.org/alpine/edge/community/x86_64/APKINDEX.tar.gz
06:56:51.108 > fetch http://nl.alpinelinux.org/alpine/edge/testing/x86_64/APKINDEX.tar.gz
06:56:57.055 > v20200122-3-g52d979af44 [http://dl-cdn.alpinelinux.org/alpine/edge/main]
v20200122-1-ge3d1f94ef3 [http://dl-cdn.alpinelinux.org/alpine/edge/community]
v20200117-229-g073aaff70d [http://nl.alpinelinux.org/alpine/edge/testing]
06:56:57.149 > OK: 15538 distinct packages available
06:56:57.551 > OK: 6 MiB in 14 packages
06:56:58.023 > ERROR: 
06:56:58.105 > unsatisfiable constraints:

06:56:58.146 > php7.1 (missing):
06:56:58.193 > required by: world[php7.1]
  php7.1-mongodb (missing):
    required by: world[php7.1-mongodb]
  php7.1-mysqli (missing):
    required by: world[php7.1-mysqli]
  php7.1-pgsql (missing):
    required by: world[php7.1-pgsql]
  php7.1-session (missing):
    required by: world[php7.1-session]
06:56:58.664 > The command '/bin/sh -c echo '@testing http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories &&     apk update && apk upgrade &&     apk add         wget         ca-certificates         php7.1@testing         php7.1-session@testing         php7.1-mysqli@testing      
   php7.1-pgsql@testing         php7.1-mongodb@testing &&     wget https://github.com/vrana/adminer/releases/download/v$ADMINER_EDITOR_VERSION/editor-$ADMINER_EDITOR_VERSION.php -O /srv/index.php &&     apk del wget ca-certificates &&     rm -rf /var/cache/apk/*' returned a non-zero code: 5
06:56:58.721 > Error: * WARNING: docker has already been started
Error response from daemon: This node is already part of a swarm. Use "docker swarm leave" to leave this swarm and join another one.
The command '/bin/sh -c echo '@testing http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories &&     apk update && apk upgrade &&    
 apk add         wget         ca-certificates         php7.1@testing         php7.1-session@testing         php7.1-mysqli@testing         php7.1-pgsql@testing         php7.1-mongodb@testing &&     wget https://github.com/vrana/adminer/releases/download/v$ADMINER_EDITOR_VERSION/editor-$ADMINER_EDITOR_VERSION.php -O /srv/index.php &&     apk del wget ca-certificates &&     rm -rf /var/cache/apk/*' returned a non-zero code: 5
06:56:58.805 > Error: * WARNING: docker has already been started
Error response from daemon: This node is already part of a swarm. Use "docker swarm leave" to leave this swarm and join another one.
The command '/bin/sh -c echo '@testing http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories &&     apk update && apk upgrade &&    
 apk add         wget         ca-certificates         php7.1@testing         php7.1-session@testing         php7.1-mysqli@testing         php7.1-pgsql@testing         php7.1-mongodb@testing &&     wget https://github.com/vrana/adminer/releases/download/v$ADMINER_EDITOR_VERSION/editor-$ADMINER_EDITOR_VERSION.php -O /srv/index.php &&     apk del wget ca-certificates &&     rm -rf /var/cache/apk/*' returned a non-zero code: 5

the container is not shutting down properly

The PID 1 process is php and it can't handle signals properly, something like https://github.com/Yelp/dumb-init should be used as init process.

Currently the container takes minimum of 10 seconds to shut down when stopped by docker-compose. This is because the default timeout for SIGTERM processing is 10 seconds and SIGKILL is sent afterwards.

You can read more about this issue at https://docs.docker.com/compose/faq/#why-do-my-services-take-10-seconds-to-recreate-or-stop and https://github.com/Yelp/dumb-init#why-you-need-an-init-system

Does adminer:dg support mongo?

It is mentioned in the README.md that adminer with dg tag (adminer:dg) supports Mongo.

But when I look the Dockerfile, there is no related package for MongoDB, as shown below

RUN echo '@community http://nl.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \
    echo '@testing http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \
    apk update && apk upgrade && \
    apk add \
        wget \
        ca-certificates \
        php7@community \
        php7-session@community \
        php7-mysqli@community \
        php7-pgsql@community \
        php7-json@community && \
    wget https://github.com/dg/adminer-custom/archive/v$ADMINER_DG_VERION.tar.gz -O /srv/adminer.tgz && \
    tar zxvf /srv/adminer.tgz --strip-components=1 -C /srv && \
    rm /srv/adminer.tgz && \
    apk del wget ca-certificates && \
    rm -rf /var/cache/apk/*

whereas in the php7 full tag, there is MongoDB related package in the Dockerfile

RUN echo '@community http://nl.alpinelinux.org/alpine/edge/community' >> /etc/apk/repositories && \
    echo '@testing http://nl.alpinelinux.org/alpine/edge/testing' >> /etc/apk/repositories && \
    apk update && apk upgrade && \
    apk add \
        wget \
        ca-certificates \
        php7@community \
        php7-session@community \
        php7-mysqli@community \
        php7-pgsql@community \
        php7-mongodb@testing && \
        wget https://github.com/vrana/adminer/releases/download/v$ADMINER_VERSION/adminer-$ADMINER_VERSION.php -O /srv/index.php && \
    apk del wget ca-certificates && \
    rm -rf /var/cache/apk/*

So, does adminer:dg supports mongoDB? Or should I use the full one?

BTW, thank you for your good work with this project! It is really helpful.

Adminer editor runtime PHP error: Cannot access offset of type string on string in /srv/adminer.php:450

Hello there,
I am experiencing problem below with adminer (4.8.1) while using latest Docker image dockette/adminer:editor

I am opening the bug report here, because I am convinced this is an runtime error somehow caused by the environment, because the same kind of URL works (in same version) Adminer editor demo with dirreferent runtime (https://demo.adminer.org/editor.php?username=&select=songs&where%5B0%5D%5Bcol%5D=album&where%5B0%5D%5Bop%5D=%3D&where%5B0%5D%5Bval%5D=1)


URL: http://localhost:8000/?pgsql=&username=admin&select=user&where%5B0%5D%5Bcol%5D=id&where%5B0%5D%5Bop%5D=%3D&where%5B0%5D%5Bval%5D=373b5863-4444-4001-98f5-097dc2ece295

HTTP request:

Request URL: http://localhost:8000/?pgsql=&username=admin&select=user&where%5B0%5D%5Bcol%5D=id&where%5B0%5D%5Bop%5D=%3D&where%5B0%5D%5Bval%5D=373b5863-4444-4001-98f5-097dc2ece295
Request Method: GET
Status Code: 500 Internal Server Error
Remote Address: [::1]:8000
Referrer Policy: origin-when-cross-origin

HTTP response:

Connection: close
Content-type: text/html; charset=UTF-8
Date: Wed, 03 Aug 2022 06:26:23 GMT
Host: localhost:8000
X-Powered-By: PHP/8.0.13

Docker logs:

database-editor_1  | [7] [Wed Aug  3 06:21:19 2022] 172.19.0.1:64412 [500]: GET /?pgsql=&username=admin&select=user&where%5B0%5D%5Bcol%5D=id&where%5B0%5D%5Bop%5D=%3D&where%5B0%5D%5Bval%5D=373b5863-4444-4001-98f5-097dc2ece295 - Uncaught TypeError: Cannot access offset of type string on string in /srv/adminer.php:450
database-editor_1  | Stack trace:
database-editor_1  | #0 /srv/adminer.php(1199): Min_Driver->convertSearch()
database-editor_1  | #1 /srv/adminer.php(1490): Adminer->selectSearchProcess()
database-editor_1  | #2 /srv/index.php(54): include('...')
database-editor_1  | #3 {main}
database-editor_1  |   thrown in /srv/adminer.php on line 450
database-editor_1  | [7] [Wed Aug  3 06:21:19 2022] 172.19.0.1:64412 Closing

Use latest version by default

Instead of changing the default value of ENV every time a new version comes out, could we use the latest by default?

Something like this? (Yes it works on alpine.)

wget -qO- "https://api.github.com/repos/vrana/adminer/releases/latest" | sed -n 's/\s*"tag_name": "v\?\([0-9.]*\)",/\1/p'

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.