Skip to content

Misconfigured multi-stage step name in all Dockerfiles #63

@atlas-wheatear

Description

@atlas-wheatear

My actions before raising this issue

Expected Behaviour

The faas-cli build, having pulled the most recent templates for python3-http as of the last 30 minutes, should continue to build as it did earlier today.
(There could be a problem my end, but it's failing on my local M1 Macbook Pro and my GitLab instance.)
Functions I haven't modified at all in days are also failing redeployment.

Current Behaviour

It fails, seemingly because it is trying to pull from a remote "builder" image on Docker Hub, as opposed to using the builder "stage" of the multi-stage build. Error below:

#3 [internal] load metadata for docker.io/library/builder:latest
#3 sha256:261eb3ef077559ec61986b2391905264393ea6320a9bca56ed4d427da6e7cb59
#3 ERROR: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed
------
 > [internal] load metadata for docker.io/library/builder:latest:
------
failed to solve with frontend dockerfile.v0: failed to create LLB definition: pull access denied, repository does not exist or may require authorization: server message: insufficient_scope: authorization failed

Possible Solution

Explicitly label the previous stage as builder? I'm actually stumped as to why this has broken just now, perhaps due to a breaking of compatibility introduced by using the --platform flag?

FROM --platform=${TARGETPLATFORM:-linux/amd64} python:3.7-alpine

Steps to Reproduce (for bugs)

  1. using this code https://github.com/emoulsdale/openfaas-test (sorry, it's really bad and unidiomatic)
  2. run faas-cli template store pull python3-http
  3. run faas-cli build
  4. observe this error appear!

Context

My test functions are no longer building with the newest templates at all. Sorry to be a pain :) . I can revert back to the previous version for now though! Will have to check it in to my code manually, and alter the CI scripts.

Your Environment

  • FaaS-CLI version ( Full output from: faas-cli version ):
    0.14.2

  • Docker version docker version (e.g. Docker 17.0.05 ):
    Docker version 20.10.13, build a224086

  • Are you using Docker Swarm or Kubernetes (FaaS-netes)?
    Kubernetes

  • Operating System and version (e.g. Linux, Windows, MacOS):
    MacOS with M1 Pro

  • Code example or link to GitHub repo or gist to reproduce problem:

  • Other diagnostic information / logs from troubleshooting guide

https://github.com/emoulsdale/openfaas-test

Next steps

You may join Slack for community support.

Just wanted to add that this still only the first problem I've had, so far, after months of trying silly things. I am really enjoying sponsoring this project!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions