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

Having trouble building a project with various builder images. #28

Open
ruseinov opened this issue Apr 17, 2020 · 5 comments
Open

Having trouble building a project with various builder images. #28

ruseinov opened this issue Apr 17, 2020 · 5 comments

Comments

@ruseinov
Copy link

ruseinov commented Apr 17, 2020

I get rpc error: code = Unknown desc = Unable to build the crate => caused by: Unable to solve the graph => caused by: grpc-status: Unknown, grpc-message: "unknown API capability file.base"
After all the dependencies have been downloaded and => Evaluating the build plan 19.3s has been emitted.

# syntax = denzp/cargo-wharf-frontend:v0.1.0-alpha.1

[package]
name = "xxx"
version = "0.1.0"
authors = ["xxx <xxx>"]
edition = "2018"

[dependencies]
actix-cors = "0.2.0"
actix-web = {version = "2.0"} #, features = ["openssl"]}
actix-web-httpauth = "0.4.1"
actix-http = "1.0.1"
actix-rt = "1.0"
actix-threadpool = "0.3.1"
strum_macros = "0.18.0"
chrono = "0.4"
dotenv = "0.15.0"
failure = "0.1.7"
mongodb = "0.9.2"
bson = "0.14.1"
serde = "1.0.105"
serde_derive = "1"
serde_json = "1"
futures = "0.3.4"
validator = "0.10.0"
validator_derive = "0.10.0"
env_logger = "0.7.1"
derive_more = "0.99.3"
log = "0.4.8"
rust-argon2 = "0.8.1"
rand = "0.7.3"
jsonwebtoken = "7.1.0"
openidconnect = {git = "https://github.com/ruseinov/openidconnect-rs.git", features = ["futures-03", "reqwest-010"], default-features = false }
url = "2.1.1"
openssl = "0.10.28"
error-chain = "0.12.2"
reqwest = { version = "0.10", features = ["json"] }

[package.metadata.wharf.builder]
image = "rust:1.42"

[package.metadata.wharf.output]
image = "rust:1.42.0-slim-buster"
workdir = "/"
entrypoint = ["/bin/api"]
expose = ["8088"]
stop-signal = "SIGINT"

[[package.metadata.wharf.binary]]
name = "api"
destination = "/bin/api"

This builds fine with a normal Dockerfile and the same builder image.

@ruseinov
Copy link
Author

I actually have the same issue building the example single-bin project with the "latest" image or any other for that matter.

@ruseinov
Copy link
Author

This might be an issue with certain capabilities not enabled in docker-machine, I have latest docker and docker-machine. Will try to resolve it myself and post the progress here for anyone who might stumble upon this issue as well.

@ruseinov
Copy link
Author

I can confirm that this does not work on google cloud build either with the same error.

@denzp
Copy link
Owner

denzp commented Apr 18, 2020

Hi, thanks for trying out the tool!

I'm afraid the message can indicate that older than the supported version of BuildKit / Docker is used.
I can confirm that the required metadata in the Cargo.toml is correct because I was able to get past "Evaluating the build plan" stage on my machine. The docker version I use is v19.03.8-ce and CI for this repo is also using v19.03.x.

As far as I remember v18.06.x had an older version of BuildKit, without file.base capability. Could you please share your environment details? Usually the output of docker info contains a lot of helpful troubleshooting information.

@ruseinov
Copy link
Author

ruseinov commented Apr 18, 2020

Thanks for looking into this!

MacBook-Pro:backend romanuseinov$ docker version
Client: Docker Engine - Community
 Version:           19.03.8
 API version:       1.39 (downgraded from 1.40)
 Go version:        go1.14
 Git commit:        afacb8b
 Built:             Thu Mar 12 02:45:41 2020
 OS/Arch:           darwin/amd64
 Experimental:      false

Server: Docker Engine - Community
 Engine:
  Version:          18.09.0
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       4d60db4
  Built:            Wed Nov  7 00:52:55 2018
  OS/Arch:          linux/amd64
  Experimental:     false
MacBook-Pro:backend romanuseinov$ docker info
Client:
 Debug Mode: false

Server:
 Containers: 5
  Running: 1
  Paused: 0
  Stopped: 4
 Images: 66
 Server Version: 18.09.0
 Storage Driver: overlay2
  Backing Filesystem: extfs
  Supports d_type: true
  Native Overlay Diff: true
 Logging Driver: json-file
 Cgroup Driver: cgroupfs
 Plugins:
  Volume: local
  Network: bridge host macvlan null overlay
  Log: awslogs fluentd gcplogs gelf journald json-file local logentries splunk syslog
 Swarm: inactive
 Runtimes: runc
 Default Runtime: runc
 Init Binary: docker-init
 containerd version: 468a545b9edcd5932818eb9de8e72413e616e86e
 runc version: 69663f0bd4b60df09991c08812a60108003fa340
 init version: fec3683
 Security Options:
  seccomp
   Profile: default
 Kernel Version: 4.14.79-boot2docker
 Operating System: Boot2Docker 18.09.0 (TCL 8.2.1)
 OSType: linux
 Architecture: x86_64
 CPUs: 8
 Total Memory: 6.772GiB
 Name: dckr
 ID: GEAC:Q3ML:6EUF:RML7:DAN6:CAIV:7647:DSJD:YL7T:DS64:JC3E:3BZA
 Docker Root Dir: /mnt/sda1/var/lib/docker
 Debug Mode: false
 Username: ruseinov
 Registry: https://index.docker.io/v1/
 Labels:
  provider=virtualbox
 Experimental: false
 Insecure Registries:
  127.0.0.0/8
 Live Restore Enabled: false
 Product License: Community Engine

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

No branches or pull requests

2 participants