This repository has been archived on 2025-03-20. You can view files and clone it, but cannot push or open issues or pull requests.
build-containers/build-icecast.jenkins

61 lines
1.2 KiB
Plaintext

def dockerFile = """
FROM alpine:latest
MAINTAINER TheSpider <spider@smoothnet.org>
RUN \\
apk add --no-cache icecast && \\
mkdir /icecast
USER icecast
WORKDIR /icecast
"""
podTemplate(
containers: [
containerTemplate(
name: "docker",
image: "docker:19.03",
command: "sleep",
args: "99d",
envVars: [
envVar(
key: "DOCKER_HOST",
value: "tcp://localhost:2375"
)
]
),
containerTemplate(
name: "docker-daemon",
image: "docker:19.03-dind",
command: "dockerd-entrypoint.sh",
args: "--insecure-registry registry.test-chamber-13.lan:5000",
privileged: true,
envVars: [
envVar(
key: "DOCKER_TLS_CERTDIR",
value: ""
)
],
)
]
) {
node(POD_LABEL) {
container("docker") {
stage("Write Dockerfile"){
writeFile(file: "Dockerfile", text: dockerFile)
}
stage("Build Container"){
dockerImage = docker.build("thespider/icecast")
}
stage('Push image') {
docker.withRegistry('https://registry.hub.docker.com', 'docker-hub-credentials') {
dockerImage.push("latest")
}
}
}
}
}