Add 'build-icecast'
This commit is contained in:
parent
92304cc2e3
commit
35d897d3a3
61
build-icecast
Normal file
61
build-icecast
Normal file
@ -0,0 +1,61 @@
|
|||||||
|
|
||||||
|
|
||||||
|
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")
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
Reference in New Issue
Block a user