简介: omnidb-server 是一个开源免费的web端数据库客户端工具,支持 Postgresql,mysql,mariadb,oracle,sqlite 等数据库。
GitHub传送门: omnidb
官网传送门: omnidb website
官方文档传送门: omnidb doc
一、下载 OmniDB-Server RPM包
wget https://github.com/OmniDB/OmniDB/releases/download/3.0.3b/omnidb-server-3.0.3b_linux_x86_64.rpm
二、 DockerFile
FROM centos:7
ADD omnidb-server-3.0.3b_linux_x86_64.rpm omnidb-server-3.0.3b_linux_x86_64.rpm
RUN rpm -ivh ./omnidb-server-3.0.3b_linux_x86_64.rpm
EXPOSE 8000
ENTRYPOINT omnidb-server -H 0.0.0.0 -p 8000 -d /opt/omnidb-data
WORKDIR /opt/omnidb-data
三、build镜像
[root@qc omn]# ls
DockerFile omnidb-server-3.0.3b_linux_x86_64.rpm
[root@qc omn]# docker build -f DockerFile .
四、为镜像打tag
[root@qc omn]# docker tag [CONTAINER_ID] omnidb:v3
[root@qc omn]# docker images
REPOSITORY TAG IMAGE ID CREATED SIZE
omnidb v3 da0136a75f82 10 minutes ago 333MB
五、 运行容器
[root@qc omn]# docker run --rm -it -p 18000:8000 omnidb:v3 /bin/sh
Copying config file to home directory.
Running database migrations...
Operations to perform:
Apply all migrations: OmniDB_app, admin, auth, contenttypes, sessions, social_django
Running migrations:
Applying contenttypes.0001_initial... OK
Applying auth.0001_initial... OK
Applying OmniDB_app.0001_3_0_0... OK
Applying OmniDB_app.0002_3_0_1... OK
Applying OmniDB_app.0003_3_1_0... OK
Applying admin.0001_initial... OK
Applying admin.0002_logentry_remove_auto_add... OK
Applying admin.0003_logentry_add_action_flag_choices... OK
Applying contenttypes.0002_remove_content_type_name... OK
Applying auth.0002_alter_permission_name_max_length... OK
Applying auth.0003_alter_user_email_max_length... OK
Applying auth.0004_alter_user_username_opts... OK
Applying auth.0005_alter_user_last_login_null... OK
Applying auth.0006_require_contenttypes_0002... OK
Applying auth.0007_alter_validators_add_error_messages... OK
Applying auth.0008_alter_user_username_max_length... OK
Applying auth.0009_alter_user_last_name_max_length... OK
Applying auth.0010_alter_group_name_max_length... OK
Applying auth.0011_update_proxy_permissions... OK
Applying auth.0012_alter_user_first_name_max_length... OK
Applying sessions.0001_initial... OK
Applying social_django.0001_initial... OK
Applying social_django.0002_add_related_name... OK
Applying social_django.0003_alter_email_max_length... OK
Applying social_django.0004_auto_20160423_0400... OK
Applying social_django.0005_auto_20160727_2333... OK
Applying social_django.0006_partial... OK
Applying social_django.0007_code_timestamp... OK
Applying social_django.0008_partial_timestamp... OK
Applying social_django.0009_auto_20191118_0520... OK
Applying social_django.0010_uid_db_index... OK
Attempting to migrate users, connections and monitoring units and snippets from OmniDB 2 to 3...
Source database file does not contain the required tables, skipping...
Starting OmniDB server...
Checking port availability...
Starting server OmniDB 3.0.3b at 0.0.0.0:8000.
Open OmniDB in your favorite browser
Press Ctrl+C to exit
六、 访问
账户密码默认 admin/admin
image.png
网友评论