Skip to content

Commit ac293fc

Browse files
committed
adminer
1 parent 4a38f66 commit ac293fc

3 files changed

Lines changed: 62 additions & 68 deletions

File tree

Lines changed: 26 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
1-
name: 'build docker images: AdminerEvo'
1+
name: 'build docker images: Adminer'
22

33
on:
44
#push:
55
# branches:
66
# - 'main'
77
# - 'master'
88
# paths:
9-
# - 'adminerevo.wolfi.Dockerfile'
10-
# - '.github/workflows/build_docker_images-adminerevo.yaml'
9+
# - 'adminer_standalone_extended.multiarch.alpine.Dockerfile'
10+
# - '.github/workflows/build_docker_images-adminer.yaml'
1111
workflow_dispatch:
1212
schedule:
1313
- cron: '45 8 28 * *' # At 07:45 on day-of-month 28.
@@ -28,25 +28,20 @@ jobs:
2828
run: |
2929
BUILD_DATE="$(date -u +'%Y-%m-%dT%H:%M:%SZ')"
3030
BUILD_DATE_NUMERIC="${BUILD_DATE//[^[:digit:]]/}"
31-
COMMIT_HASH=${GITHUB_SHA::7}
32-
GIT_URL=$(echo "${GITHUB_SERVER_URL}" | awk -F/ '{print $3}' | sed 's/\/*$//')
33-
GIT_URL=$(echo "$GIT_URL" | sed 's/github\.com/ghcr\.io/g') # GIT_URL switch to ghcr.io registry for GitHub
34-
GIT_REPO=${GITHUB_REPOSITORY,,}
35-
GIT_REPO_SHORT=${GIT_REPO#*/}
36-
GIT_REPO_SHORT=${GIT_REPO_SHORT#"docker-"}
37-
DOCKER_REPO=${{ secrets.DOCKER_USERNAME }}/${GIT_REPO_SHORT}
38-
REDHAT_QUAY_REPO=${{ secrets.REDHAT_QUAY_USERNAME }}/${GIT_REPO_SHORT}
39-
40-
#echo "ENVs: BUILD_DATE=${BUILD_DATE}, BUILD_DATE_NUMERIC=${BUILD_DATE_NUMERIC}, COMMIT_HASH=${COMMIT_HASH}, GIT_URL=${GIT_URL}, GIT_REPO=${GIT_REPO}"
31+
COMMIT_HASH=${GITHUB_SHA::8}
32+
GITHUB_REPO=${GITHUB_REPOSITORY,,}
33+
GITHUB_REPO_SHORT=${GITHUB_REPO#*/}
34+
GITHUB_REPO_SHORT=${GITHUB_REPO_SHORT#"docker-"}
35+
DOCKER_REPO=${{ secrets.DOCKER_USERNAME }}/${GITHUB_REPO_SHORT}
36+
REDHAT_QUAY_REPO=${{ secrets.REDHAT_QUAY_USERNAME }}/${GITHUB_REPO_SHORT}
4137
42-
# Set output parameters to action.
43-
echo "build_date=${BUILD_DATE}" >> "$GITHUB_OUTPUT"
44-
echo "build_date_numeric=${BUILD_DATE_NUMERIC}" >> "$GITHUB_OUTPUT"
45-
echo "commit_hash=${COMMIT_HASH}" >> "$GITHUB_OUTPUT"
46-
echo "git_url=${GIT_URL}" >> "$GITHUB_OUTPUT"
47-
echo "git_repo=${GIT_REPO}" >> "$GITHUB_OUTPUT"
48-
echo "docker_repo=${DOCKER_REPO}" >> "$GITHUB_OUTPUT"
49-
echo "redhat_quay_repo=${REDHAT_QUAY_REPO}" >> "$GITHUB_OUTPUT"
38+
# Set output parameters to github action.
39+
echo ::set-output name=build_date::${BUILD_DATE}
40+
echo ::set-output name=build_date_numeric::${BUILD_DATE_NUMERIC}
41+
echo ::set-output name=commit_hash::${COMMIT_HASH}
42+
echo ::set-output name=github_repo::${GITHUB_REPO}
43+
echo ::set-output name=docker_repo::${DOCKER_REPO}
44+
echo ::set-output name=redhat_quay_repo::${REDHAT_QUAY_REPO}
5045
5146
- name: Set up QEMU
5247
id: qemu
@@ -57,16 +52,16 @@ jobs:
5752

5853
- name: Set up Docker Buildx
5954
id: buildx
60-
uses: docker/setup-buildx-action@v3
55+
uses: docker/setup-buildx-action@v3
6156

62-
- name: Login to GIT Container Registry
57+
- name: Login to GitHub Container Registry
6358
uses: docker/login-action@v3
6459
with:
65-
registry: ${{ steps.script.outputs.git_url }}
60+
registry: ghcr.io
6661
username: ${{ github.repository_owner }}
6762
password: ${{ secrets.GITHUB_TOKEN }}
6863

69-
- name: Login to DockerHub Container Registry
64+
- name: Login to DockerHub
7065
uses: docker/login-action@v3
7166
with:
7267
registry: docker.io
@@ -85,13 +80,14 @@ jobs:
8580
with:
8681
builder: ${{ steps.buildx.outputs.name }}
8782
context: .
88-
file: ./adminerevo.wolfi.Dockerfile
89-
platforms: linux/amd64,linux/arm64
83+
file: ./adminer_standalone_extended.multiarch.alpine.Dockerfile
84+
platforms: linux/amd64,linux/arm64/v8,linux/arm/v7
9085
push: true
9186
build-args: |
9287
BUILD_DATE=${{steps.script.outputs.build_date}}
9388
VCS_REF=${{steps.script.outputs.commit_hash}}
9489
tags: |
95-
docker.io/${{steps.script.outputs.docker_repo}}:adminerevo
96-
quay.io/${{steps.script.outputs.redhat_quay_repo}}:adminerevo
97-
${{steps.script.outputs.git_url}}/${{steps.script.outputs.git_repo}}:adminerevo
90+
ghcr.io/${{steps.script.outputs.github_repo}}:adminer-${{steps.script.outputs.build_date_numeric}}.${{steps.script.outputs.commit_hash}}
91+
ghcr.io/${{steps.script.outputs.github_repo}}:adminer
92+
docker.io/${{steps.script.outputs.docker_repo}}:adminer
93+
quay.io/${{steps.script.outputs.redhat_quay_repo}}:adminer
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# build: docker build --no-cache --progress=plain -t tobi312/tools:adminer -f adminer_standalone_extended.multiarch.alpine.Dockerfile .
2+
FROM adminer:standalone
3+
4+
ARG VCS_REF
5+
ARG BUILD_DATE
6+
7+
LABEL org.opencontainers.image.title="Adminer" \
8+
#org.opencontainers.image.authors="Community" \
9+
org.opencontainers.image.created="${BUILD_DATE}" \
10+
org.opencontainers.image.revision="${VCS_REF}" \
11+
org.opencontainers.image.description="Adminer: Database management in a single PHP file." \
12+
org.opencontainers.image.documentation="https://hub.docker.com/_/adminer" \
13+
org.opencontainers.image.base.name="docker.io/library/adminer:standalone" \
14+
#org.opencontainers.image.licenses="Apache-2.0" \
15+
org.opencontainers.image.url="https://hub.docker.com/r/tobi312/tools" \
16+
org.opencontainers.image.source="https://github.com/Tob1as/docker-tools"
17+
18+
# switch user
19+
USER root
20+
21+
# php-extension-installer https://github.com/mlocati/docker-php-extension-installer
22+
#COPY --from=ghcr.io/mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
23+
COPY --from=mlocati/php-extension-installer /usr/bin/install-php-extensions /usr/local/bin/
24+
25+
RUN set -x ; \
26+
install-php-extensions \
27+
#pdo_dblib \
28+
oci8 \
29+
#interbase \
30+
mongodb \
31+
; \
32+
echo "PHP extensions installation is complete!"
33+
34+
35+
# switch user
36+
USER adminer

adminerevo.wolfi.Dockerfile

Lines changed: 0 additions & 38 deletions
This file was deleted.

0 commit comments

Comments
 (0)