Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,9 @@ name: "Docker"
on:
workflow_dispatch:

pull_request:

push:
branches: ["master"]

schedule:
- cron: "0 8 * * 1"
Expand Down Expand Up @@ -51,6 +52,11 @@ jobs:
tag: oracle-12
platforms: linux/amd64

- dockerfile: ./adminer-oracle-19/Dockerfile
context: ./adminer-oracle-19
tag: oracle-19
platforms: linux/amd64

- dockerfile: ./adminer-postgres/Dockerfile
context: ./adminer-postgres
tag: postgres
Expand All @@ -74,7 +80,7 @@ jobs:
uses: docker/setup-buildx-action@v3

- name: Login to DockerHub
if: github.ref == 'refs/heads/master'
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: docker/login-action@v3
with:
username: ${{ secrets.DOCKERHUB_USERNAME }}
Expand Down Expand Up @@ -104,7 +110,7 @@ jobs:
docker stop $CONTAINER_ID

- name: Build and push to registry
if: github.ref == 'refs/heads/master'
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
uses: docker/build-push-action@v6
with:
context: ${{ matrix.context }}
Expand Down
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
DOCKER_IMAGE=dockette/adminer
DOCKER_PLATFORMS?=linux/amd64

build-all: build-full build-dg build-editor build-mongo build-mysql build-postgres build-oracle-11 build-oracle-12
build-all: build-full build-dg build-editor build-mongo build-mysql build-postgres build-oracle-11 build-oracle-12 build-oracle-19

_docker-build-%: TAG=$*
_docker-build-%:
Expand All @@ -15,6 +15,7 @@ build-mysql: _docker-build-mysql
build-postgres: _docker-build-postgres
build-oracle-11: _docker-build-oracle-11
build-oracle-12: _docker-build-oracle-12
build-oracle-19: _docker-build-oracle-19

_docker-test-%: TAG=$*
_docker-test-%:
Expand All @@ -28,8 +29,9 @@ test-mysql: _docker-test-mysql
test-postgres: _docker-test-postgres
test-oracle-11: _docker-test-oracle-11
test-oracle-12: _docker-test-oracle-12
test-oracle-19: _docker-test-oracle-19

test-all: test-full test-dg test-editor test-mongo test-mysql test-postgres test-oracle-11 test-oracle-12
test-all: test-full test-dg test-editor test-mongo test-mysql test-postgres test-oracle-11 test-oracle-12 test-oracle-19

update-versions:
find . -type f -name Dockerfile -exec sed -i '' 's/ENV ADMINER_VERSION=.*/ENV ADMINER_VERSION=${ADMINER_VERSION}/g' {} +
Expand Down
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,12 +26,13 @@ There are few variants of this adminer image based:
- mysql (only)
- pgsql (only)
- mongo (only)
- oracle-11 / oracle-12 / oracle-19 (only)
- dg (custom)

**Features**

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

## Usage
Expand Down
58 changes: 58 additions & 0 deletions adminer-oracle-19/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
FROM dockette/debian:bookworm-slim

LABEL maintainer="Milan Sulc <sulcmil@gmail.com>"

ENV ADMINER_VERSION=5.4.2
ENV MEMORY=256M
ENV UPLOAD=2048M
ENV PORT=80
ENV LD_LIBRARY_PATH="/usr/local/lib;/usr/local/instantclient"
ENV WORKERS=8
ENV PHP_CLI_SERVER_WORKERS=${WORKERS}

# DEPENDENCIES #################################################################
RUN apt-get update && \
apt-get dist-upgrade -y && \
apt install -y apt-transport-https lsb-release ca-certificates curl wget && \
wget -O /etc/apt/trusted.gpg.d/php.gpg https://packages.sury.org/php/apt.gpg && \
sh -c 'echo "deb https://packages.sury.org/php/ $(lsb_release -sc) main" > /etc/apt/sources.list.d/php.list' && \
apt-get update && \
apt-get install -y \
make \
autoconf \
g++ \
unzip \
libaio1 \
ca-certificates \
php8.4 \
php8.4-dev \
php8.4-xml \
php-pear \
tini && \
wget https://github.com/vrana/adminer/releases/download/v$ADMINER_VERSION/adminer-$ADMINER_VERSION.php -O /srv/index.php

# OCI8 (ORACLE) ################################################################
RUN wget https://download.oracle.com/otn_software/linux/instantclient/1930000/instantclient-basic-linux.x64-19.30.0.0.0dbru.zip -O /tmp/instantclient-basic-linux.x64-19.30.0.0.0dbru.zip && \
wget https://download.oracle.com/otn_software/linux/instantclient/1930000/instantclient-sdk-linux.x64-19.30.0.0.0dbru.zip -O /tmp/instantclient-sdk-linux.x64-19.30.0.0.0dbru.zip && \
unzip -o /tmp/instantclient-basic-linux.x64-19.30.0.0.0dbru.zip -d /usr/local/ && \
unzip -o /tmp/instantclient-sdk-linux.x64-19.30.0.0.0dbru.zip -d /usr/local/ && \
ln -s /usr/local/instantclient_19_30 /usr/local/instantclient && \
ln -sf /usr/local/instantclient/libclntsh.so.19.1 /usr/local/instantclient/libclntsh.so && \
echo 'instantclient,/usr/local/instantclient' | pecl install oci8 && \
echo "extension=oci8.so" > /etc/php/8.4/cli/conf.d/00-oci8.ini

# CLEAN UP #####################################################################
RUN apt-get clean -y && \
apt-get autoclean -y && \
apt-get remove -y wget && \
apt-get autoremove -y && \
rm -rf /var/lib/apt/lists/* /var/lib/log/* /tmp/* /var/tmp/*

ADD ./entrypoint.sh /entrypoint.sh
RUN chmod +x /entrypoint.sh

WORKDIR /srv
EXPOSE 80

ENTRYPOINT ["tini", "--"]
CMD ["/entrypoint.sh"]
38 changes: 38 additions & 0 deletions adminer-oracle-19/entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
#!/bin/bash
set -Eeo pipefail

if [ "${ADMINER_DEBUG}" = "1" ]; then
set -o xtrace
fi

# Banner
if [ "${ADMINER_BANNER}" != "0" ] && [ "${ADMINER_BANNER}" != "false" ] && [ "${ADMINER_BANNER}" != "no" ] && [ "${ADMINER_BANNER}" != "off" ]; then
cat << 'EOF'
█████╗ ██████╗ ███╗ ███╗██╗███╗ ██╗███████╗██████╗
██╔══██╗██╔══██╗████╗ ████║██║████╗ ██║██╔════╝██╔══██╗
███████║██║ ██║██╔████╔██║██║██╔██╗ ██║█████╗ ██████╔╝
██╔══██║██║ ██║██║╚██╔╝██║██║██║╚██╗██║██╔══╝ ██╔══██╗
██║ ██║██████╔╝██║ ╚═╝ ██║██║██║ ╚████║███████╗██║ ██║
╚═╝ ╚═╝╚═════╝ ╚═╝ ╚═╝╚═╝╚═╝ ╚═══╝╚══════╝╚═╝ ╚═╝
EOF
fi

echo "[adminer] Loading Adminer (Oracle 19)..."

# Set default values if not provided
MEMORY=${MEMORY:-256M}
UPLOAD=${UPLOAD:-2048M}
PORT=${PORT:-80}

echo "[adminer] Starting PHP server (http://0.0.0.0:${PORT} in Docker):"
echo "-> memory_limit=${MEMORY}"
echo "-> upload_max_filesize=${UPLOAD}"
echo "-> post_max_size=${UPLOAD}"
echo "-> port=${PORT}"

# Execute PHP server
exec php \
-d "memory_limit=${MEMORY}" \
-d "upload_max_filesize=${UPLOAD}" \
-d "post_max_size=${UPLOAD}" \
-S "0.0.0.0:${PORT}"