upgrade alpine+glpi
continuous-integration/drone/push Build encountered an error Details
continuous-integration/drone/tag Build encountered an error Details

This commit is contained in:
Paolo Asperti 2023-12-13 11:39:04 +01:00
parent 4c0d5f6ef9
commit cbc162e79c
Signed by: paspo
GPG Key ID: 06D46905D19D5182
10 changed files with 12 additions and 16 deletions

View File

@ -1,6 +0,0 @@
db/
glpi/
docker-compose.yaml
.drone.yaml
.env
.gitignore

View File

@ -1,19 +1,20 @@
def main(ctx): def main(ctx):
archs = ["amd64", "arm64"] ## arm archs = ["amd64", "arm64"] ## arm
glpi_version = "10.0.10" glpi_version = "10.0.11"
alpine_version = "3.19"
out = [] out = []
for arch in archs: for arch in archs:
out += onpush(ctx, glpi_version, arch) out += onpush(ctx, glpi_version, arch)
for arch in archs: 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) out += manifest_publish(ctx, glpi_version, archs)
return out return out
def onpush(ctx, glpi_version, arch): def onpush(ctx, glpi_version, alpine_version, arch):
return [{ return [{
"kind": "pipeline", "kind": "pipeline",
"type": "docker", "type": "docker",
@ -26,12 +27,13 @@ def onpush(ctx, glpi_version, arch):
"name": "build_on_push", "name": "build_on_push",
"image": "plugins/docker:linux-%s" % (arch), "image": "plugins/docker:linux-%s" % (arch),
"settings": { "settings": {
"context": ".", "context": "src",
"dockerfile": "./Dockerfile", "dockerfile": "src/Dockerfile",
"dry_run": True, "dry_run": True,
"repo": "docker.asperti.com/paspo/glpi", "repo": "docker.asperti.com/paspo/glpi",
"build_args": [ "build_args": [
"GLPI_VERSION=%s" % (glpi_version) "GLPI_VERSION=%s" % (glpi_version),
"ALPINE_VERSION=%s" % (alpine_version)
], ],
}, },
}], }],

View File

@ -7,8 +7,8 @@ Web server for GLPI deployment
## build ## build
```bash ```bash
git submodule update --init --remote cd src
docker build -t docker.asperti.com/paspo/glpi . docker build -t docker.asperti.com/paspo/glpi --build-arg "ALPINE_VERSION=3.19" --build-arg "GLPI_VERSION=10.0.11" .
``` ```
## run ## run

View File

@ -1,4 +1,5 @@
FROM alpine:3.18 ARG ALPINE_VERSION
FROM alpine:${ALPINE_VERSION}
ARG GLPI_VERSION ARG GLPI_VERSION
RUN \ RUN \
@ -10,7 +11,6 @@ RUN \
php82-simplexml php82-sodium php82-tokenizer php82-xml php82-zip php82-xmlreader php82-xmlwriter && \ 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 && \ wget -O /usr/local/bin/composer https://getcomposer.org/download/2.5.8/composer.phar && \
chmod +x /usr/local/bin/composer && \ 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 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 # this are needed if you want to manually install GLPI from git