Compare commits
17 Commits
Author | SHA1 | Date |
---|---|---|
|
8da18a99b1 | |
|
343d54a0d1 | |
|
65f9d88d77 | |
|
e6c537fc78 | |
|
1ded686191 | |
|
e8a6290073 | |
|
469c123d24 | |
|
1880a2f504 | |
|
83de939022 | |
|
d25e59f713 | |
|
501696ea00 | |
|
e02f469b7b | |
|
86b60e5f80 | |
|
eac77422ef | |
|
4466e553b0 | |
|
4da629e35c | |
|
a7efc524ce |
63
.drone.yml
63
.drone.yml
|
@ -1,14 +1,18 @@
|
||||||
|
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: docker
|
type: kubernetes
|
||||||
name: amd64
|
name: build-arm64
|
||||||
|
|
||||||
|
node_selector:
|
||||||
|
kubernetes.io/arch: arm64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: docker
|
- name: docker build
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
repo: badjware/nextcloud-tweak
|
repo: ${DRONE_REPO}
|
||||||
auto_tag: true
|
tag: ${DRONE_COMMIT_SHA:0:8}-arm64
|
||||||
|
# docker use a mtu of 1500 by default, which may cause packet drop in k8s
|
||||||
|
mtu: 1450
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
|
@ -16,18 +20,53 @@ steps:
|
||||||
---
|
---
|
||||||
kind: pipeline
|
kind: pipeline
|
||||||
type: kubernetes
|
type: kubernetes
|
||||||
name: arm64
|
name: build-amd64
|
||||||
|
|
||||||
node_selector:
|
node_selector:
|
||||||
beta.kubernetes.io/arch: arm64
|
kubernetes.io/arch: amd64
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: docker
|
- name: docker build
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
repo: badjware/nextcloud-tweak
|
repo: ${DRONE_REPO}
|
||||||
auto_tag: true
|
tag: ${DRONE_COMMIT_SHA:0:8}-amd64
|
||||||
|
# docker use a mtu of 1500 by default, which may cause packet drop in k8s
|
||||||
|
mtu: 1450
|
||||||
username:
|
username:
|
||||||
from_secret: docker_username
|
from_secret: docker_username
|
||||||
password:
|
password:
|
||||||
from_secret: docker_password
|
from_secret: docker_password
|
||||||
|
---
|
||||||
|
kind: pipeline
|
||||||
|
type: kubernetes
|
||||||
|
name: create-multiarch-manifest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: docker manifest
|
||||||
|
image: docker:20-dind-rootless
|
||||||
|
commands:
|
||||||
|
- docker login -u "$DOCKER_USERNAME" -p "$DOCKER_PASSWORD"
|
||||||
|
- docker manifest create ${DRONE_REPO}:${DRONE_TAG:-latest} --amend ${DRONE_REPO}:${DRONE_COMMIT_SHA:0:8}-amd64 --amend ${DRONE_REPO}:${DRONE_COMMIT_SHA:0:8}-arm64
|
||||||
|
- docker manifest push ${DRONE_REPO}:${DRONE_TAG:-latest}
|
||||||
|
environment:
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
- name: cleanup
|
||||||
|
image: alpine
|
||||||
|
commands:
|
||||||
|
- apk add curl jq
|
||||||
|
- 'DOCKER_TOKEN="$(curl -sf -XPOST -H "Content-Type: application/json" -d "{\"username\":\"$DOCKER_USERNAME\",\"password\":\"$DOCKER_PASSWORD\"}" https://hub.docker.com/v2/users/login | jq --raw-output .token)"'
|
||||||
|
- 'curl -sf -XDELETE -H "Accept: application/json" -H "Authorization: Bearer $DOCKER_TOKEN" https://hub.docker.com/v2/repositories/${DRONE_REPO}/tags/${DRONE_COMMIT_SHA:0:8}-arm64/'
|
||||||
|
- 'curl -sf -XDELETE -H "Accept: application/json" -H "Authorization: Bearer $DOCKER_TOKEN" https://hub.docker.com/v2/repositories/${DRONE_REPO}/tags/${DRONE_COMMIT_SHA:0:8}-amd64/'
|
||||||
|
environment:
|
||||||
|
DOCKER_USERNAME:
|
||||||
|
from_secret: docker_username
|
||||||
|
DOCKER_PASSWORD:
|
||||||
|
from_secret: docker_password
|
||||||
|
|
||||||
|
depends_on:
|
||||||
|
- build-arm64
|
||||||
|
- build-amd64
|
11
Dockerfile
11
Dockerfile
|
@ -1,8 +1,7 @@
|
||||||
FROM nextcloud:22.2.3-apache
|
FROM nextcloud:25.0.3-apache
|
||||||
|
|
||||||
COPY supervisord/supervisord.conf /opt/supervisord.conf
|
COPY supervisord/supervisord.conf /opt/supervisord.conf
|
||||||
|
|
||||||
# install cron
|
|
||||||
RUN apt-get update \
|
RUN apt-get update \
|
||||||
&& apt-get install -y --no-install-recommends \
|
&& apt-get install -y --no-install-recommends \
|
||||||
ffmpeg \
|
ffmpeg \
|
||||||
|
@ -10,15 +9,9 @@ RUN apt-get update \
|
||||||
procps \
|
procps \
|
||||||
smbclient \
|
smbclient \
|
||||||
supervisor \
|
supervisor \
|
||||||
libbz2-dev \
|
|
||||||
libc-client-dev \
|
|
||||||
libkrb5-dev \
|
|
||||||
libsmbclient-dev \
|
|
||||||
&& pecl install smbclient \
|
|
||||||
&& docker-php-ext-enable smbclient \
|
|
||||||
&& mkdir /var/log/supervisord /var/run/supervisord \
|
&& mkdir /var/log/supervisord /var/run/supervisord \
|
||||||
&& rm -rf /var/lib/apt/lists/*
|
&& rm -rf /var/lib/apt/lists/*
|
||||||
|
|
||||||
ENV NEXTCLOUD_UPDATE=1
|
ENV NEXTCLOUD_UPDATE=1
|
||||||
|
|
||||||
CMD ["/usr/bin/supervisord", "-c", "/opt/supervisord.conf"]
|
CMD ["/usr/bin/supervisord", "-c", "/opt/supervisord.conf"]
|
||||||
|
|
Reference in New Issue