Skip to content

Commit

Permalink
Added custom push action. Pinned version 4.8.1 for compatibility issu…
Browse files Browse the repository at this point in the history
…es with "hydra" theme/design.
  • Loading branch information
AlessandroZanatta committed Aug 12, 2024
1 parent a142a13 commit 4a7d083
Show file tree
Hide file tree
Showing 5 changed files with 52 additions and 84 deletions.
52 changes: 0 additions & 52 deletions .github/workflows/build.yml

This file was deleted.

22 changes: 0 additions & 22 deletions .github/workflows/hub.yaml

This file was deleted.

38 changes: 38 additions & 0 deletions .github/workflows/push_image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
name: Build and push docker image

on:
push:
branches: [main]

env:
REGISTRY: registry.snakectf.org
TAG: latest

jobs:
build-and-push:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write

steps:
- name: Checkout
uses: actions/checkout@v4

- name: Login to Container registry
uses: docker/login-action@v3
with:
registry: ${{ env.REGISTRY }}
username: ${{ secrets.REGISTRY_USERNAME }}
password: ${{ secrets.REGISTRY_PASSWORD }}

- name: Setup Docker Buildx
uses: docker/setup-buildx-action@v3

- name: Build and push image
uses: docker/build-push-action@v6
with:
file: Dockerfile
push: true
tags: ${{ env.REGISTRY }}/management-2024/adminerevo:${{ env.TAG }}
12 changes: 8 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,5 @@
FROM cgr.dev/chainguard/wolfi-base

ARG ADMINEREVO_VERSION=4.8.4

RUN apk add --no-cache \
php-8.3 \
php-8.3-curl \
Expand All @@ -13,10 +11,15 @@ RUN apk add --no-cache \

COPY rootfs /

ARG ADMINEREVO_VERSION=4.8.1

RUN set -x \
&& apk add --no-cache git curl \
&& curl -fsSL "https://github.com/adminerevo/adminerevo/releases/download/v$ADMINEREVO_VERSION/adminer-$ADMINEREVO_VERSION.php" -o /var/www/html/adminer.php \
&& git clone --recurse-submodules=designs --depth 1 --shallow-submodules --branch "v$ADMINEREVO_VERSION" https://github.com/adminerevo/adminerevo.git /tmp/adminer \
&& curl -fsSL "https://github.com/adminerevo/adminerevo/archive/refs/tags/v$ADMINEREVO_VERSION.zip" -o /tmp/adminerevo.zip \
&& unzip /tmp/adminerevo.zip -d /tmp \
&& php "/tmp/adminerevo-$ADMINEREVO_VERSION/compile.php" \
&& cp "adminer-$ADMINEREVO_VERSION.php" /var/www/html/adminer.php \
&& git clone --recurse-submodules=designs --depth 1 --shallow-submodules https://github.com/adminerevo/adminerevo.git /tmp/adminer \
&& cp -r /tmp/adminer/designs/ /tmp/adminer/plugins/ /var/www/html \
&& rm -rf /tmp/adminer/ \
&& chown -R nonroot:nonroot /var/www/html \
Expand All @@ -27,3 +30,4 @@ USER nonroot
EXPOSE 8080
ENV PHP_CLI_SERVER_WORKERS=4
CMD [ "php", "-S", "[::]:8080", "-t", "/var/www/html" ]

12 changes: 6 additions & 6 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ Example `docker-compose.yml` for `adminerevo`:
```yaml
# Use root/example as user/password credentials

version: '3.1'
version: "3.1"
services:
adminer:
image: ghcr.io/shyim/adminerevo:latest
Expand All @@ -47,7 +47,7 @@ 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' ghcr.io/shyim/adminerevo:latest
```

If a plugin *requires* parameters to work correctly instead of adding the plugin to `ADMINER_PLUGINS`, you need to add a custom file to the container:
If a plugin _requires_ parameters to work correctly instead of adding the plugin to `ADMINER_PLUGINS`, you need to add a custom file to the container:

```console
$ docker run --link some_database:db -p 8080:8080 -e ADMINER_PLUGINS='login-servers' ghcr.io/shyim/adminerevo:latest
Expand Down Expand Up @@ -93,10 +93,10 @@ docker run -p 8080:8080 -e ADMINER_DEFAULT_SERVER=mysql ghcr.io/shyim/adminerevo

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

- MySQL
- PostgreSQL
- SQLite
- Elasticsearch
- MySQL
- PostgreSQL
- SQLite
- Elasticsearch

# License

Expand Down

0 comments on commit 4a7d083

Please sign in to comment.