From cbc162e79c6bf15f25b43b32773e9df62b7cd253 Mon Sep 17 00:00:00 2001 From: paspo Date: Wed, 13 Dec 2023 11:39:04 +0100 Subject: [PATCH] upgrade alpine+glpi --- .dockerignore | 6 ------ .drone.star | 14 ++++++++------ README.md | 4 ++-- Dockerfile => src/Dockerfile | 4 ++-- {rootfs => src/rootfs}/etc/nginx/conf.d/glpi.conf | 0 .../rootfs}/etc/nginx/http.d/default.conf | 0 {rootfs => src/rootfs}/etc/php82/conf.d/php.ini | 0 .../rootfs}/etc/php82/php-fpm.d/www.conf | 0 {rootfs => src/rootfs}/start.sh | 0 .../rootfs}/var/www/glpi/inc/downstream.php | 0 10 files changed, 12 insertions(+), 16 deletions(-) delete mode 100644 .dockerignore rename Dockerfile => src/Dockerfile (94%) rename {rootfs => src/rootfs}/etc/nginx/conf.d/glpi.conf (100%) rename {rootfs => src/rootfs}/etc/nginx/http.d/default.conf (100%) rename {rootfs => src/rootfs}/etc/php82/conf.d/php.ini (100%) rename {rootfs => src/rootfs}/etc/php82/php-fpm.d/www.conf (100%) rename {rootfs => src/rootfs}/start.sh (100%) rename {rootfs => src/rootfs}/var/www/glpi/inc/downstream.php (100%) diff --git a/.dockerignore b/.dockerignore deleted file mode 100644 index 6fbec4a..0000000 --- a/.dockerignore +++ /dev/null @@ -1,6 +0,0 @@ -db/ -glpi/ -docker-compose.yaml -.drone.yaml -.env -.gitignore diff --git a/.drone.star b/.drone.star index de1ff9b..0e7bffd 100644 --- a/.drone.star +++ b/.drone.star @@ -1,19 +1,20 @@ def main(ctx): archs = ["amd64", "arm64"] ## arm - glpi_version = "10.0.10" + glpi_version = "10.0.11" + alpine_version = "3.19" out = [] for arch in archs: out += onpush(ctx, glpi_version, arch) for arch in archs: - out += build_publish(ctx, glpi_version, arch) + out += build_publish(ctx, glpi_version, alpine_version, arch) out += manifest_publish(ctx, glpi_version, archs) return out -def onpush(ctx, glpi_version, arch): +def onpush(ctx, glpi_version, alpine_version, arch): return [{ "kind": "pipeline", "type": "docker", @@ -26,12 +27,13 @@ def onpush(ctx, glpi_version, arch): "name": "build_on_push", "image": "plugins/docker:linux-%s" % (arch), "settings": { - "context": ".", - "dockerfile": "./Dockerfile", + "context": "src", + "dockerfile": "src/Dockerfile", "dry_run": True, "repo": "docker.asperti.com/paspo/glpi", "build_args": [ - "GLPI_VERSION=%s" % (glpi_version) + "GLPI_VERSION=%s" % (glpi_version), + "ALPINE_VERSION=%s" % (alpine_version) ], }, }], diff --git a/README.md b/README.md index 428207e..7a9a497 100644 --- a/README.md +++ b/README.md @@ -7,8 +7,8 @@ Web server for GLPI deployment ## build ```bash -git submodule update --init --remote -docker build -t docker.asperti.com/paspo/glpi . +cd src +docker build -t docker.asperti.com/paspo/glpi --build-arg "ALPINE_VERSION=3.19" --build-arg "GLPI_VERSION=10.0.11" . ``` ## run diff --git a/Dockerfile b/src/Dockerfile similarity index 94% rename from Dockerfile rename to src/Dockerfile index ad4b3e8..c54ef98 100644 --- a/Dockerfile +++ b/src/Dockerfile @@ -1,4 +1,5 @@ -FROM alpine:3.18 +ARG ALPINE_VERSION +FROM alpine:${ALPINE_VERSION} ARG GLPI_VERSION RUN \ @@ -10,7 +11,6 @@ RUN \ php82-simplexml php82-sodium php82-tokenizer php82-xml php82-zip php82-xmlreader php82-xmlwriter && \ wget -O /usr/local/bin/composer https://getcomposer.org/download/2.5.8/composer.phar && \ chmod +x /usr/local/bin/composer && \ - ln -s /usr/bin/php82 /usr/bin/php && \ wget -O - https://github.com/glpi-project/glpi/releases/download/${GLPI_VERSION}/glpi-${GLPI_VERSION}.tgz | tar xz -C /var/www # this are needed if you want to manually install GLPI from git diff --git a/rootfs/etc/nginx/conf.d/glpi.conf b/src/rootfs/etc/nginx/conf.d/glpi.conf similarity index 100% rename from rootfs/etc/nginx/conf.d/glpi.conf rename to src/rootfs/etc/nginx/conf.d/glpi.conf diff --git a/rootfs/etc/nginx/http.d/default.conf b/src/rootfs/etc/nginx/http.d/default.conf similarity index 100% rename from rootfs/etc/nginx/http.d/default.conf rename to src/rootfs/etc/nginx/http.d/default.conf diff --git a/rootfs/etc/php82/conf.d/php.ini b/src/rootfs/etc/php82/conf.d/php.ini similarity index 100% rename from rootfs/etc/php82/conf.d/php.ini rename to src/rootfs/etc/php82/conf.d/php.ini diff --git a/rootfs/etc/php82/php-fpm.d/www.conf b/src/rootfs/etc/php82/php-fpm.d/www.conf similarity index 100% rename from rootfs/etc/php82/php-fpm.d/www.conf rename to src/rootfs/etc/php82/php-fpm.d/www.conf diff --git a/rootfs/start.sh b/src/rootfs/start.sh similarity index 100% rename from rootfs/start.sh rename to src/rootfs/start.sh diff --git a/rootfs/var/www/glpi/inc/downstream.php b/src/rootfs/var/www/glpi/inc/downstream.php similarity index 100% rename from rootfs/var/www/glpi/inc/downstream.php rename to src/rootfs/var/www/glpi/inc/downstream.php