美文网首页
docker镜像:adminer

docker镜像:adminer

作者: 夜游上河园 | 来源:发表于2019-02-12 20:20 被阅读0次

Supported tags and respective Dockerfile links

Quick reference

Adminer

What is Adminer?

Adminer (formerly phpMinAdmin) is a full-featured database management tool written in PHP. Conversely to phpMyAdmin, it consist of a single file ready to deploy to the target server. Adminer is available for MySQL, PostgreSQL, SQLite, MS SQL, Oracle, Firebird, SimpleDB, Elasticsearch and MongoDB.

adminer.org

logo

How to use this image

Standalone

$ docker run --link some_database:db -p 8080:8080 adminer

Then you can hit http://localhost:8080 or http://host-ip:8080 in your browser.

FastCGI

If you are already running a FastCGI capable web server you might prefer running Adminer via FastCGI:

$ docker run --link some_database:db -p 9000:9000 adminer:fastcgi

Then point your web server to port 9000 of the container.

Note: This exposes the FastCGI socket to the Internet. Make sure to add proper firewall rules or use a private Docker network instead to prevent a direct access.

... via docker stack deploy or docker-compose

Example stack.yml for adminer:

# Use root/example as user/password credentials

version: '3.1'

services:

  adminer:
    image: adminer
    restart: always
    ports:
      - 8080:8080

  db:
    image: mysql:5.6
    restart: always
    environment:
      MYSQL_ROOT_PASSWORD: example

[图片上传失败...(image-841cb6-1549974016453)]

Run docker stack deploy -c stack.yml adminer (or docker-compose -f stack.yml up), wait for it to initialize completely, and visit http://swarm-ip:8080, http://localhost:8080, or http://host-ip:8080 (as appropriate).

Loading plugins

This image bundles all official Adminer plugins. You can find the list of plugins on GitHub: https://github.com/vrana/adminer/tree/master/plugins.

To load plugins you can pass a list of filenames in ADMINER_PLUGINS:

$ docker run --link some_database:db -p 8080:8080 -e ADMINER_PLUGINS='tables-filter tinymce' adminer

If a plugin requires parameters to work correctly you will need to add a custom file to the container:

$ docker run --link some_database:db -p 8080:8080 -e ADMINER_PLUGINS='login-servers' adminer
Unable to load plugin file "login-servers", because it has required parameters: servers
Create a file "/var/www/html/plugins-enabled/login-servers.php" with the following contents to load the plugin:

<?php
require_once('plugins/login-servers.php');

/** Set supported servers
    * @param array array($domain) or array($domain => $description) or array($category => array())
    * @param string
    */
return new AdminerLoginServers(
    $servers = ???,
    $driver = 'server'
);

To load a custom plugin you can add PHP scripts that return the instance of the plugin object to /var/www/html/plugins-enabled/.

Choosing a design

The image bundles all the designs that are available in the source package of adminer. You can find the list of designs on GitHub: https://github.com/vrana/adminer/tree/master/designs.

To use a bundled design you can pass its name in ADMINER_DESIGN:

$ docker run --link some_database:db -p 8080:8080 -e ADMINER_DESIGN='nette' adminer

To use a custom design you can add a file called /var/www/html/adminer.css.

Usage with external server

You can specify the default host with the ADMINER_DEFAULT_SERVER environment variable. This is useful if you are connecting to an external server or a docker container named something other than the default db.

docker run -p 8080:8080 -e ADMINER_DEFAULT_SERVER=mysql adminer

Supported Drivers

While Adminer supports a wide range of database drivers this image only supports the following out of the box:

  • MySQL
  • PostgreSQL
  • SQLite
  • SimpleDB
  • Elasticsearch

To add support for the other drivers you will need to install the following PHP extensions on top of this image:

  • pdo_dblib (MS SQL)
  • oci8 (Oracle)
  • interbase (Firebird)
  • mongodb (MongoDB)

License

View license information for the software contained in this image.

As with all Docker images, these likely also contain other software which may be under other licenses (such as Bash, etc from the base distribution, along with any direct or indirect dependencies of the primary software being contained).

Some additional license information which was able to be auto-detected might be found in the repo-info repository's adminer/ directory.

As for any pre-built image usage, it is the image user's responsibility to ensure that any use of this image complies with any relevant licenses for all software contained within.

相关文章

  • docker镜像:adminer

    Supported tags and respective Dockerfile links 4.7.1-stan...

  • Centos7基于docker搭建禅道15.2

    操作步骤:首先安装docker环境 然后下载禅道镜像 启动容器 想要访问数据库,adminer还需要配置数据库权限...

  • Docker基础操作

    Docker部署 Docker安装 镜像加速 Docker 基础命令 Docker镜像管理 搜索镜像docker ...

  • docker常用操作

    下载docker镜像 查看docker镜像 搜索docker镜像 开启docker容器 查看全部docker实例 ...

  • Docker 常用命令及参数

    Docker镜像命令 docker 镜像检索 docker search 镜像名docker search red...

  • dock学习笔记

    从镜像仓库拉取镜像 docker pull (镜像名称) 查看docker镜像 docker images 从镜像...

  • Docker 常用命令总结

    Docker镜像管理 搜索镜像:docker search 获取镜像:docker pull 查看镜像:docke...

  • 大觅网

    Docker镜像操作查看镜像:docker images搜索镜像:docker search 镜像关键字拉取镜像:...

  • Docker基本操作

    1. 镜像操作 搜索镜像:docker search 镜像名 拉取镜像docker pull 镜像名docker ...

  • Docker 基础 - 1

    镜像 获取镜像 docker pull 查看镜像信息 docker images docker inspect ...

网友评论

      本文标题:docker镜像:adminer

      本文链接:https://www.haomeiwen.com/subject/jbfleqtx.html