Hi Zack,

Can you share what steps 2 and 3 are in the build process?  Just at first blush, this looks like some kind of authentication error that jenkins is throwing.  Are you running the buildah commands from root or as a non-root user.  The other thought is to try what I call "decomposing" the Dockerfile.  Rather than trying to create the image using the Dockerfile, create it using buildah commands:

buildah from jenkins/jenkins:2.176.2-alpine
buildah copy  jenkins-working-container ./test_pub_key.pub /var/jenkins_home
buildah commit jenkins-working-container my-jenkins

That might shed some light on what's going on too.

t

On 09/17/2019 03:02 AM, Zack Q Chin wrote:
Hi all,

Im trying to get a build in Jenkins on GKE using buildah bud to build and push images. However i am stuck with the following error:

buildah bud -f ./docker/Dockerfile -t jtibuildah:2.176.3 ./docker
STEP 1: FROM jenkins/jenkins:2.176.3-alpine
Getting image source signatures
Copying blob sha256:c2274a1a0e2786ee9101b08f76111f9ab8019e368dce1e325d3c284a0ca33397
...
Copying blob sha256:df22617774a7cc8af8b8c966fddd08fc354d978472b42372565d71f3fa2d6fdf
Copying config sha256:932f3c392bf90fa64aa4394b96dd05236bf18dadc719413b3798c4c3491565e8
Writing manifest to image destination
Storing signatures
...
STEP 4: COPY ./test_pub_key.pub /var/jenkins_home/
error building at STEP "COPY ./test_pub_key.pub /var/jenkins_home/": error determining run uid: user: unknown user error looking up user "jenkins"
ERROR: script returned exit code 1
Finished: FAILURE

The Dockerfile used:

FROM jenkins/jenkins:2.176.3-alpine
...
COPY ./test_pub_key.pub /var/jenkins_home/
...
RUN /usr/local/bin/install-plugins.sh < /usr/share/jenkins/ref/plugins.txt

The Jenkinsfile:
podTemplate(
    containers: [
        containerTemplate(name: 'buildah', image: 'quay.io/buildah/stable:v1.11.2', ttyEnabled: true, command: 'cat',privileged: true)
    ],
    volumes:[persistentVolumeClaim(mountPath: '/home/jenkins/.local/share/containers', claimName: 'helloweb-disk', readOnly: false)]) {
  node(POD_LABEL) {
    stage('Test') {
      container('buildah') {
        sh 'buildah bud -f ./docker/Dockerfile -t jtibuildah:2.176.3 ./docker'
      }
    }
  }
}


_______________________________________________
Buildah mailing list -- buildah@lists.buildah.io
To unsubscribe send an email to buildah-leave@lists.buildah.io