add dockerfile to bake a new container with the config.

This commit is contained in:
Kameron Kenny 2024-06-05 16:57:21 -04:00
parent 70210f891d
commit 75b41ca873
No known key found for this signature in database
GPG Key ID: E5006629839D2276
3 changed files with 18 additions and 1 deletions

7
Dockerfile Normal file
View File

@ -0,0 +1,7 @@
FROM prom/prometheus
LABEL version="20240605.1.1"
LABEL description="bind9 primary nameserver"
RUN mkdir -p /etc/prometheus
COPY prometheus/prometheus.yml /etc/prometheus

8
Jenkinsfile vendored
View File

@ -14,6 +14,14 @@ pipeline {
} }
} }
stage("Build Containers and push to registry") {
steps {
script {
sh 'docker compose build --push'
}
}
}
stage('Create contexts') { stage('Create contexts') {
steps { steps {
sh 'docker context ls | grep pi502 || docker context create pi502 --docker "host=ssh://pi502.in.thelinuxpro.net"' sh 'docker context ls | grep pi502 || docker context create pi502 --docker "host=ssh://pi502.in.thelinuxpro.net"'

View File

@ -8,7 +8,9 @@ volumes:
services: services:
prometheus: prometheus:
image: prom/prometheus build:
dockerfile: Dockerfile
image: docker-registry1.in.thelinuxpro.net:5000/tlp/prometheus:240605.1.1
container_name: prometheus container_name: prometheus
command: '--config.file=/etc/prometheus/prometheus.yml' command: '--config.file=/etc/prometheus/prometheus.yml'
restart: unless-stopped restart: unless-stopped