add drone dev pipe
Some checks failed
Build/Push (master) / changes (push) Has been cancelled
Build/Push (master) / build-docker (push) Has been cancelled

This commit is contained in:
2025-03-25 02:54:35 +01:00
parent 7df3678862
commit ef0c504e00
2 changed files with 48 additions and 1 deletions

45
.drone.yaml Normal file
View File

@@ -0,0 +1,45 @@
kind: pipeline
name: default
trigger:
event:
- push
steps:
- name: docker-login
image: docker:20.10.16-dind
privileged: true
environment:
DOCKER_BUILDKIT: 1
DOCKER_USERNAME:
from_secret: docker_username
DOCKER_PASSWORD:
from_secret: docker_password
commands:
- echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- name: create-builder
image: docker:20.10.16-dind
privileged: true
environment:
DOCKER_BUILDKIT: 1
commands:
- docker buildx create --use --name multi-builder || docker buildx use multi-builder
- name: bootstrap
image: docker:20.10.16-dind
privileged: true
environment:
DOCKER_BUILDKIT: 1
commands:
- docker buildx inspect --bootstrap
- name: build-push
image: docker:20.10.16-dind
privileged: true
environment:
DOCKER_BUILDKIT: 1
DOCKER_USERNAME:
from_secret: docker_username
commands:
- docker buildx build --platform linux/amd64,linux/arm64 -t ${DOCKER_USERNAME}/deluge-openvpn:dev --push .

View File

@@ -26,8 +26,10 @@ RUN arch=$(dpkg --print-architecture) && \
if [ "$arch" = "amd64" ]; then \
dpkg-deb -x /tmp/dumb-init /tmp/dumb-init-dir && \
cp /tmp/dumb-init-dir/usr/bin/dumb-init /usr/local/bin/dumb-init; \
else \
elif [ "$arch" = "amd64" ]; then \
cp /tmp/dumb-init /usr/local/bin/dumb-init; \
else \
echo "Unsupported architecture: $arch" && exit 1; \
fi && \
chmod +x /usr/local/bin/dumb-init && \
rm -rf /tmp/dumb-init /tmp/dumb-init-dir