Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

faas-cli build to select architecture automatically #176

Closed
Lewiscowles1986 opened this issue Oct 16, 2017 · 5 comments
Closed

faas-cli build to select architecture automatically #176

Lewiscowles1986 opened this issue Oct 16, 2017 · 5 comments

Comments

@Lewiscowles1986
Copy link
Contributor

Lewiscowles1986 commented Oct 16, 2017

Provide a mechanism for FaaS CLI / Docker to detect CPU type and attempt to build Dockerfile.{cputype} if exists, with fallback to Dockerfile.

Expected Behaviour

This is an improvement AFAIK, I've not been able to find anywhere that mentions how to do this. I was going to have a cascade from Dockerfile.$(arch) (most specific) Dockerfile.$(arch-short) (semi-generic) to the default Dockerfile

Current Behaviour

When I build, it looks like Dockerfile.armhf needs to be named Dockerfile

Possible Solution

I was going to code a build utility with tests that provides either

  • The ability to pass arguments to docker build $(args) . -t
  • Cascade checking for file existence

Steps to Reproduce (for bugs)

Not a bug

Context

This issue is raised as it's really messing with my laziness, and after checking, it looks like I just imagined docker handled this (not sure why)

Your Environment

  • Docker version docker version :

    $ docker version
    Client:
     Version:      17.05.0-ce
     API version:  1.29
     Go version:   go1.7.5
     Git commit:   89658be
     Built:        Thu May  4 22:30:54 2017
     OS/Arch:      linux/arm
    
    Server:
     Version:      17.05.0-ce
     API version:  1.29 (minimum version 1.12)
     Go version:   go1.7.5
     Git commit:   89658be
     Built:        Thu May  4 22:30:54 2017
     OS/Arch:      linux/arm
     Experimental: false
    
  • Are you using Docker Swarm or Kubernetes (FaaS-netes)? docker-swarm

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

  • Link to your project or a code example to reproduce issue: N/A

@austinfrey
Copy link
Contributor

austinfrey commented Oct 16, 2017

Derek add label: proposal

@open-derek open-derek bot added the proposal label Oct 16, 2017
@alexellis
Copy link
Member

alexellis commented Oct 16, 2017

We haven't done this yet because we didn't have a good / standard way of doing it. Don't want to really end up managing this in the project if possible. Multi-arch builds may solve this.. worth re-visting when Alpine Linux is multi-arch (currently blocked).

@alexellis
Copy link
Member

Derek add label: revisit

@open-derek open-derek bot added the revisit label Oct 16, 2017
@Lewiscowles1986
Copy link
Contributor Author

I do have a way of doing it on Linux, but I must admit I hadn't considered anything outside of arm, arm64 and amd64 (only architectures I have access to)

@alexellis
Copy link
Member

Which architectures do you need? I think two is enough to come up with a solution.

I'm going to close this issue but mark it as revisit when multi-arch support is finished by Docker Inc.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants