mirror of
https://git.netzspielplatz.de/docker-multiarch/prosody.git
synced 2025-11-08 18:59:27 +00:00
Compare commits
29 commits
| Author | SHA1 | Date | |
|---|---|---|---|
| cdd08afd57 | |||
|
|
2823980be5 | ||
| 777fe64cdc | |||
| 3ea970a14e | |||
| 5ffb34a8c0 | |||
| a3c4066f28 | |||
| 8c16e380fc | |||
| a4482be8ea | |||
| 3d504fbfb0 | |||
| b3e399e93c | |||
| 988cd03b37 | |||
| 204799632f | |||
| 147c416d26 | |||
| e6d77c4e27 | |||
| 1d75f246c3 | |||
| 9820641a36 | |||
| 8d462cf78b | |||
| 47d9a72e43 | |||
| f427d472ea | |||
| 43b2f2da19 | |||
| c21a87e34d | |||
| e1cb12e555 | |||
| e79a709db0 | |||
|
|
bf7a0faff6 | ||
|
|
d58ef69d92 | ||
|
|
ea94828447 | ||
|
|
682af5c1c6 | ||
|
|
b5c73b979e | ||
|
|
69aad8e891 |
3 changed files with 18 additions and 74 deletions
|
|
@ -1,77 +1,21 @@
|
|||
# This is a GitLab CI configuration to build the project as a docker image
|
||||
# The file is generic enough to be dropped in a project containing a working Dockerfile
|
||||
# Author: Florent CHAUVEAU <florent.chauveau@gmail.com>
|
||||
# Mentioned here: https://blog.callr.tech/building-docker-images-with-gitlab-ci-best-practices/
|
||||
|
||||
# do not use "latest" here, if you want this to work in the future
|
||||
image: docker:19
|
||||
image: egon0/docker-with-buildx-and-git:latest
|
||||
|
||||
variables:
|
||||
DOCKER_DRIVER: overlay
|
||||
DOCKER_HOST: tcp://docker:2375/
|
||||
DOCKER_DRIVER: overlay2
|
||||
DOCKER_TLS_CERTDIR: ""
|
||||
|
||||
stages:
|
||||
- build
|
||||
- push
|
||||
|
||||
# Use this if your GitLab runner does not use socket binding
|
||||
services:
|
||||
- docker:19-dind
|
||||
- docker:dind
|
||||
|
||||
before_script:
|
||||
# docker login asks for the password to be passed through stdin for security
|
||||
# we use $CI_JOB_TOKEN here which is a special token provided by GitLab
|
||||
- echo -n $CI_JOB_TOKEN | docker login -u gitlab-ci-token --password-stdin $CI_REGISTRY
|
||||
|
||||
Build:
|
||||
build:
|
||||
stage: build
|
||||
script:
|
||||
# fetches the latest image (not failing if image is not found)
|
||||
- docker pull $CI_REGISTRY_IMAGE:latest || true
|
||||
# builds the project, passing proxy variables, and vcs vars for LABEL
|
||||
# notice the cache-from, which is going to use the image we just pulled locally
|
||||
# the built image is tagged locally with the commit SHA, and then pushed to
|
||||
# the GitLab registry
|
||||
- >
|
||||
docker build
|
||||
--pull
|
||||
--build-arg VCS_REF=$CI_COMMIT_SHA
|
||||
--build-arg VCS_URL=$CI_PROJECT_URL
|
||||
--cache-from $CI_REGISTRY_IMAGE:latest
|
||||
--tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
||||
.
|
||||
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
||||
|
||||
# Here, the goal is to tag the "main" branch as "latest"
|
||||
Push latest:
|
||||
variables:
|
||||
# We are just playing with Docker here.
|
||||
# We do not need GitLab to clone the source code.
|
||||
GIT_STRATEGY: none
|
||||
stage: push
|
||||
only:
|
||||
# Only "main" should be tagged "latest"
|
||||
- main
|
||||
IMAGE_TAG: $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_SLUG
|
||||
D_IMAGE_TAG: egon0/prosody-alpine-ldap-multiarch:$CI_COMMIT_REF_SLUG
|
||||
D_LATEST_TAG: egon0/prosody-alpine-ldap-multiarch:latest
|
||||
script:
|
||||
# Because we have no guarantee that this job will be picked up by the same runner
|
||||
# that built the image in the previous step, we pull it again locally
|
||||
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
||||
# Then we tag it "latest"
|
||||
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:latest
|
||||
# Annnd we push it.
|
||||
- docker push $CI_REGISTRY_IMAGE:latest
|
||||
|
||||
# Finally, the goal here is to Docker tag any Git tag
|
||||
# GitLab will start a new pipeline everytime a Git tag is created, which is pretty awesome
|
||||
Push tag:
|
||||
variables:
|
||||
# Again, we do not need the source code here. Just playing with Docker.
|
||||
GIT_STRATEGY: none
|
||||
stage: push
|
||||
only:
|
||||
# We want this job to be run on tags only.
|
||||
- tags
|
||||
script:
|
||||
- docker pull $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
||||
- docker tag $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
||||
- docker push $CI_REGISTRY_IMAGE:$CI_COMMIT_REF_NAME
|
||||
- docker login -u $CI_REGISTRY_USER -p $CI_REGISTRY_PASSWORD $CI_REGISTRY
|
||||
- docker login -u $DOCKER_LOGIN -p $DOCKER_PASSWORD
|
||||
- docker buildx create --use --name A$CI_COMMIT_SHORT_SHA
|
||||
- docker buildx build --platform $BUILD_PLATFORMS --push -t $IMAGE_TAG -t $CI_REGISTRY_IMAGE:latest -t $D_IMAGE_TAG -t $D_LATEST_TAG .
|
||||
|
|
|
|||
|
|
@ -1,7 +1,5 @@
|
|||
FROM alpine:3.8
|
||||
MAINTAINER Jochen Schalanda <jochen+docker@schalanda.name>
|
||||
|
||||
ENV PROSODY_VERSION 0.10.2-r0
|
||||
FROM alpine:3.16
|
||||
MAINTAINER Micha Gläß-Stöcker <micha+docker@glaess.cc>
|
||||
|
||||
# Build-time metadata as defined at http://label-schema.org
|
||||
ARG BUILD_DATE
|
||||
|
|
@ -13,13 +11,12 @@ LABEL org.label-schema.build-date=$BUILD_DATE \
|
|||
org.label-schema.description="Prosody IM Docker image based on Alpine Linux" \
|
||||
org.label-schema.url="https://prosody.im/" \
|
||||
org.label-schema.vcs-ref=$VCS_REF \
|
||||
org.label-schema.vcs-url="https://github.com/joschi/docker-prosody-alpine" \
|
||||
org.label-schema.version=$VERSION \
|
||||
org.label-schema.schema-version="1.0" \
|
||||
com.microscaling.docker.dockerfile="/Dockerfile" \
|
||||
com.microscaling.license="MIT"
|
||||
|
||||
RUN apk add --no-cache bash "prosody=${PROSODY_VERSION}"
|
||||
RUN apk add --no-cache bash "prosody" lua5.2-ldap
|
||||
RUN mkdir -p /etc/prosody/conf.d /usr/local/lib/prosody/modules
|
||||
|
||||
COPY prosody.cfg.lua /etc/prosody/prosody.cfg.lua
|
||||
|
|
|
|||
3
renovate.json
Normal file
3
renovate.json
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
{
|
||||
"$schema": "https://docs.renovatebot.com/renovate-schema.json"
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue