diff --git a/Jenkinsfile b/Jenkinsfile index 4c1add8..f62c7e8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -10,13 +10,14 @@ pipeline { name: docker spec: containers: - - name: kaniko - image: gcr.io/kaniko-project/executor:debug - imagePullPolicy: Always - command: - - sleep - args: - - 9999999 + - name: buildah + image: buildah/buildah:latest + securityContext: + privileged: true + volumeMounts: + - mountPath: "/home/jenkins/agent" + name: "workspace-volume" + readOnly: false - name: dind image: docker:24.0.0-rc.1-dind securityContext: @@ -32,11 +33,8 @@ pipeline { stages { stage('Build Docker image') { steps { - container(name: 'kaniko', shell: '/busybox/sh') { - sh '''#!/busybox/sh - - /kaniko/executor --dockerfile `pwd`/Dockerfile --context `pwd` --destination="andreas/rsyncd:latest" - ''' + container('buildah') { + sh 'buildah build --format=docker -f Dockerfile -t onbuild-image .' } } }