Signed-off-by: ale <ale@manalejandro.com>
This commit is contained in:
parent
431337da6f
commit
4f49c5dc8a
68
.drone.yml
Normal file
68
.drone.yml
Normal file
@ -0,0 +1,68 @@
|
|||||||
|
kind: pipeline
|
||||||
|
name: build-linux-arm64-amd64
|
||||||
|
type: docker
|
||||||
|
|
||||||
|
platform:
|
||||||
|
os: linux
|
||||||
|
arch: arm64
|
||||||
|
|
||||||
|
clone:
|
||||||
|
disable: true
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: build-arm64
|
||||||
|
image: docker:dind
|
||||||
|
privileged: true
|
||||||
|
environment:
|
||||||
|
USER:
|
||||||
|
from_secret: user
|
||||||
|
PASS:
|
||||||
|
from_secret: pass
|
||||||
|
REGISTRY:
|
||||||
|
from_secret: registry
|
||||||
|
volumes:
|
||||||
|
- name: etcdocker
|
||||||
|
path: /etc/docker
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
commands:
|
||||||
|
- docker login -u $USER -p $PASS $REGISTRY
|
||||||
|
- docker buildx build --platform arm64 -t $REGISTRY/monit .
|
||||||
|
- docker push $REGISTRY/monit
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- tag
|
||||||
|
|
||||||
|
- name: build-amd64
|
||||||
|
image: docker:dind
|
||||||
|
privileged: true
|
||||||
|
environment:
|
||||||
|
USER:
|
||||||
|
from_secret: user
|
||||||
|
PASS:
|
||||||
|
from_secret: pass
|
||||||
|
REGISTRY:
|
||||||
|
from_secret: registry
|
||||||
|
volumes:
|
||||||
|
- name: etcdocker
|
||||||
|
path: /etc/docker
|
||||||
|
- name: dockersock
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
commands:
|
||||||
|
- docker login -u $USER -p $PASS $REGISTRY
|
||||||
|
- docker run --rm --privileged $REGISTRY/qemu-user-static --reset -p yes
|
||||||
|
- docker buildx build --platform amd64 -t $REGISTRY/monit .
|
||||||
|
- docker push $REGISTRY/monit
|
||||||
|
when:
|
||||||
|
event:
|
||||||
|
- push
|
||||||
|
- tag
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
- name: dockersock
|
||||||
|
host:
|
||||||
|
path: /var/run/docker.sock
|
||||||
|
- name: etcdocker
|
||||||
|
host:
|
||||||
|
path: /etc/docker
|
@ -1,9 +1,9 @@
|
|||||||
FROM alpine:3.20
|
FROM alpine:3.21
|
||||||
|
|
||||||
LABEL maintainer="Luis Miguel Vicente Fuentes"
|
LABEL maintainer="Luis Miguel Vicente Fuentes"
|
||||||
|
|
||||||
# monit environment variables
|
# monit environment variables
|
||||||
ENV MONIT_VERSION=5.34.0 \
|
ENV MONIT_VERSION=5.34.3 \
|
||||||
MONIT_HOME=/opt/monit \
|
MONIT_HOME=/opt/monit \
|
||||||
MONIT_URL=https://mmonit.com/monit/dist \
|
MONIT_URL=https://mmonit.com/monit/dist \
|
||||||
PATH=$PATH:/opt/monit/bin
|
PATH=$PATH:/opt/monit/bin
|
||||||
|
@ -38,9 +38,9 @@ Docker documentation: <https://docs.docker.com/>
|
|||||||
|
|
||||||
### Docker Hub image
|
### Docker Hub image
|
||||||
|
|
||||||
- pull docker image from gitlab: `docker pull registry.gitlab.com/manalejandro/monit-docker/monit:latest`
|
- pull docker image from gitlab: `docker pull registry.manalejandro.com/monit:latest`
|
||||||
|
|
||||||
- start monit: `docker run --rm -it -p 2812:2812 -v $(pwd)/monitrc:/etc/monitrc registry.gitlab.com/manalejandro/monit-docker/monit:latest`
|
- start monit: `docker run --rm -it -p 2812:2812 -v $(pwd)/monitrc:/etc/monitrc registry.manalejandro.com/monit:latest`
|
||||||
|
|
||||||
- create a docker container:
|
- create a docker container:
|
||||||
|
|
||||||
@ -49,7 +49,7 @@ docker create \
|
|||||||
--name=monit \
|
--name=monit \
|
||||||
-p 2812:2812 \
|
-p 2812:2812 \
|
||||||
-v $(pwd)/monitrc:/etc/monitrc \
|
-v $(pwd)/monitrc:/etc/monitrc \
|
||||||
registry.gitlab.com/manalejandro/monit-docker/monit:latest
|
registry.manalejandro.com/monit:latest
|
||||||
```
|
```
|
||||||
|
|
||||||
### Docker compose
|
### Docker compose
|
||||||
|
@ -1,7 +1,7 @@
|
|||||||
services:
|
services:
|
||||||
monit:
|
monit:
|
||||||
# image: registry.gitlab.com/manalejandro/monit-docker/monit:latest
|
image: registry.manalejandro.com/monit:latest
|
||||||
image: monit
|
# image: monit
|
||||||
build: .
|
build: .
|
||||||
hostname: monit
|
hostname: monit
|
||||||
container_name: monit
|
container_name: monit
|
||||||
@ -10,6 +10,7 @@ services:
|
|||||||
test: curl --fail http://admin:monit@monit:2812/ || exit 1
|
test: curl --fail http://admin:monit@monit:2812/ || exit 1
|
||||||
interval: 1m
|
interval: 1m
|
||||||
retries: 1
|
retries: 1
|
||||||
|
start_period: 1m
|
||||||
ports:
|
ports:
|
||||||
- "2812:2812"
|
- "2812:2812"
|
||||||
volumes:
|
volumes:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user