Commit 76d1e1aa authored by Thibault's avatar Thibault
Browse files
parents 947de1ff cddeb962
FROM debian:stretch
RUN apt-get update && apt-get -y install host telnet netcat procps net-tools iptables tcpdump && apt-get clean && rm -rf /var/cache/apt/archives /var/lib/apt/lists
EXPOSE 3000 4000 5000 6000
ADD netfilter_gw1.sh /netfilter.sh
CMD [ "/netfilter.sh" ]
node {
def app1
stage('Cleaning up working dir') {
step([$class: 'WsCleanup'])
}
stage('Clone repository') {
/* Let's make sure we have the repository cloned to our workspace */
checkout scm
}
stage('build') {
stage('Build image application:latest') {
/* This builds the actual image; synonymous to
* docker build on the command line */
app1 = docker.build( "http://localhost:8081/repository/docker-private/debian:1")
}
}
stage('Push image') {
/* Finally, we'll push the image with two tags:
* First, the incremental build number from Jenkins
* Second, the 'latest' tag.
* Pushing multiple tags is cheap, as all the layers are reused. */
docker.withRegistry('http://localhost:8081/repository/docker-private/', 'nexus-user-credentials') {
app1.push("latest")
}
}
}
\ No newline at end of file
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment