build nextcloud image from source
This commit is contained in:
parent
c7ac4a471e
commit
4cc2bd594d
2 changed files with 26 additions and 8 deletions
|
|
@ -17,18 +17,36 @@ jobs:
|
||||||
nextcloud-version: [ 33, 34 ]
|
nextcloud-version: [ 33, 34 ]
|
||||||
steps:
|
steps:
|
||||||
- name: Install required system packages
|
- name: Install required system packages
|
||||||
run: apk add --no-cache nodejs
|
run: apk add --no-cache nodejs git
|
||||||
|
|
||||||
- name: Checkout Source Code
|
- name: Checkout source code
|
||||||
uses: actions/checkout@v6
|
uses: actions/checkout@v6
|
||||||
|
|
||||||
- name: Build Container
|
- name: Checkout nextcloud/docker
|
||||||
|
run: git clone --depth 1 https://github.com/nextcloud/docker.git nextcloud-docker
|
||||||
|
|
||||||
|
- name: Build base Nextcloud image
|
||||||
env:
|
env:
|
||||||
KANIKO_NO_PUSH: ${{ forgejo.ref_name != 'main' }}
|
KANIKO_NO_PUSH: ${{ forgejo.ref_name != 'main' }}
|
||||||
KANIKO_GIT_HAMBURG_CCC_DE_USER: forgejo-actions
|
KANIKO_GIT_HAMBURG_CCC_DE_USER: forgejo-actions
|
||||||
KANIKO_GIT_HAMBURG_CCC_DE_PASSWORD: ${{ secrets.PACKAGES_TOKEN }}
|
KANIKO_GIT_HAMBURG_CCC_DE_PASSWORD: ${{ secrets.PACKAGES_TOKEN }}
|
||||||
run: /kaniko/executor
|
run: /kaniko/executor
|
||||||
--dockerfile="${{forgejo.workspace }}/nextcloud/Containerfile"
|
--dockerfile="${{ forgejo.workspace }}/nextcloud-docker/${{ matrix.nextcloud-version }}/apache/Dockerfile"
|
||||||
|
--context="dir://${{ forgejo.workspace }}/nextcloud-docker/${{ matrix.nextcloud-version }}/apache"
|
||||||
|
--build-arg=TAG=${{ matrix.nextcloud-version }}
|
||||||
|
--destination=git.hamburg.ccc.de/ccchh/oci-images/nextcloud-base:${{ matrix.nextcloud-version }}
|
||||||
|
--no-push-cache
|
||||||
|
--credential-helpers=env
|
||||||
|
--annotation=org.opencontainers.image.ref.name=nextcloud-base
|
||||||
|
--annotation=org.opencontainers.image.source=${{ forgejo.server_url }}/${{ forgejo.repository }}
|
||||||
|
|
||||||
|
- name: Build extended image
|
||||||
|
env:
|
||||||
|
KANIKO_NO_PUSH: ${{ forgejo.ref_name != 'main' }}
|
||||||
|
KANIKO_GIT_HAMBURG_CCC_DE_USER: forgejo-actions
|
||||||
|
KANIKO_GIT_HAMBURG_CCC_DE_PASSWORD: ${{ secrets.PACKAGES_TOKEN }}
|
||||||
|
run: /kaniko/executor
|
||||||
|
--dockerfile="${{ forgejo.workspace }}/nextcloud/Containerfile"
|
||||||
--context="dir://${{ forgejo.workspace }}/nextcloud"
|
--context="dir://${{ forgejo.workspace }}/nextcloud"
|
||||||
--build-arg=TAG=${{ matrix.nextcloud-version }}
|
--build-arg=TAG=${{ matrix.nextcloud-version }}
|
||||||
--destination=git.hamburg.ccc.de/ccchh/oci-images/nextcloud:${{ matrix.nextcloud-version }}
|
--destination=git.hamburg.ccc.de/ccchh/oci-images/nextcloud:${{ matrix.nextcloud-version }}
|
||||||
|
|
|
||||||
|
|
@ -1,10 +1,10 @@
|
||||||
ARG TAG=latest
|
ARG TAG
|
||||||
FROM docker.io/library/nextcloud:${TAG}
|
FROM git.hamburg.ccc.de/ccchh/oci-images/nextcloud-base:${TAG}
|
||||||
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y supervisor \
|
&& apt-get install -y supervisor \
|
||||||
&& rm -rf /var/lib/apt/lists/* \
|
&& rm -rf /var/lib/apt/lists/* \
|
||||||
&& mkdir -p /var/log/supervisord /var/run/supervisord
|
&& mkdir -p /var/log/supervisord /var/run/supervisord
|
||||||
|
|
||||||
# We need to copy a file to the supervisord folder in /var/run so it exists when the container starts.
|
# We need to copy a file to the supervisord folder in /var/run so it exists when the container starts.
|
||||||
COPY .keep /var/run/supervisord/
|
COPY .keep /var/run/supervisord/
|
||||||
|
|
@ -13,4 +13,4 @@ COPY supervisord.conf /
|
||||||
|
|
||||||
ENV NEXTCLOUD_UPDATE=1
|
ENV NEXTCLOUD_UPDATE=1
|
||||||
|
|
||||||
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
CMD ["/usr/bin/supervisord", "-c", "/supervisord.conf"]
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue