With current upstream code , make fails as below.
$ make
mkdir -p bin
docker build -t buildkit:buildd-standalone --target buildd-standalone -f ./hack/dockerfiles/test.Dockerfile --force-rm .
Sending build context to Docker daemon 17.06MB
Error response from daemon: No build stage in current context
Makefile:23: recipe for target 'bin/buildd-standalone' failed
make: *** [bin/buildd-standalone] Error 1
docker info and docker version please (probably moby/moby issue, not buildkit)
$ docker version
Client:
Version: 17.10.0-ce
API version: 1.33
Go version: go1.8.3
Git commit: f4ffd25
Built: Tue Oct 17 19:04:16 2017
OS/Arch: linux/amd64
Server:
Version: 17.10.0-ce
API version: 1.33 (minimum version 1.12)
Go version: go1.8.3
Git commit: f4ffd25
Built: Tue Oct 17 19:02:56 2017
OS/Arch: linux/amd64
Experimental: true
$ docker info [1/231]
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 442
Server Version: 17.10.0-ce
Storage Driver: aufs
Root Dir: /var/lib/docker/aufs
Backing Filesystem: extfs
Dirs: 472
Dirperm1 Supported: true
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host ipvlan macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: 06b9cb35161009dcb7123345749fef02f7cea8e0
runc version: 0351df1c5a66838d0c392b4ac4cf9450de844e2d
init version: 949e6fa
Security Options:
apparmor
seccomp
Profile: default
Kernel Version: 4.4.0-98-generic
Operating System: elementary OS 0.4.1 Loki
OSType: linux
Architecture: x86_64
CPUs: 4
Total Memory: 11.72GiB
Name: kunal-HP-Z400-Workstation
ID: QVO5:EZCE:NXRH:6FID:JOQ3:JBBO:NJ6V:SL6Y:IRQV:NFC2:VFWU:5DSG
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
HTTP Proxy: http://XXXXXXXX
HTTPS Proxy: http://XXXXXXX
Username: kunalkushwaha
Registry: https://index.docker.io/v1/
Experimental: true
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false
WARNING: No swap limit support
Couldn't reproduce with the same version. Looking at moby code this error appears when a command other than ARG appears before the first FROM (we should have a better message).
I added ENV statement for proxy settings, I guess that is causing issue
in this case.
Looking at moby code this error appears when a command other than ARG appears
before the first FROM (we should have a better message)
Does this means, now we cannot set ENV globally for multi stage
dockerfile?
On Nov 15, 2017 9:19 AM, "Tõnis Tiigi" notifications@github.com wrote:
Couldn't reproduce with the same version. Looking at moby code this error
appears when a command other than ARG appears before the first FROM (we
should have a better message).
—
You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/moby/buildkit/issues/164#issuecomment-344444604, or mute
the thread
https://github.com/notifications/unsubscribe-auth/ACoXITTOOtKXA9ldEjwZbMIBGv91mz66ks5s2i33gaJpZM4Qc7gh
.
Does this means, now we cannot set
ENVglobally for multi stage
dockerfile?
Yes, you can't do that. You can create a global ARG with a default value and then get access to that value from any stage that defines just ARG varname. https://github.com/docker/cli/blob/master/docs/reference/builder.md#understand-how-arg-and-from-interact Proxy settings like HTTP_PROXY are builtin and don't need to be defined in Dockerfile to be used with build args.
I just placed MAINTAINER at the top of my Dockerfile and got this error. It would be nice to have something slightly more elucidating, to be honest. Having said that, thanks for a fantastic tool.
Can someone plz help me here, I am not able to run this command and getting this error.
$ docker build -f Dockerfile -t docker-spring-boot .
Sending build context to Docker daemon 50.98MB
Error response from daemon: No build stage in current context
and my docker version is -
$ docker version
Client:
Version: 18.01.0-ce
API version: 1.35
Go version: go1.9.2
Git commit: 03596f51b1
Built: Thu Jan 11 22:29:41 2018
OS/Arch: windows/amd64
Experimental: false
Orchestrator: swarm
Server:
Engine:
Version: 18.01.0-ce
API version: 1.35 (minimum version 1.12)
Go version: go1.9.2
Git commit: 03596f5
Built: Wed Jan 10 20:13:12 2018
OS/Arch: linux/amd64
Experimental: false
And my docker file is -
$ cat dockerfile
ADD target/docker-spring-boot.jar docker-spring-boot.jar
EXPOSE 8080
ENTRYPOINT ["java","-jar","docker-spring-boot.jar"]
Please help me out here. Early reply is highly appreciable.
Your Dockerfile lacks FROM instruction.
Thanks @AkihiroSuda Now I am able to make build but I got a new warning here.
SECURITY WARNING: You are building a Docker image from Windows against a non-Windows Docker host. All files and directories added to build context will have '-rwxr-xr-x' permissions. It is recommended to double check and reset permissions for sensitive files and directories.
Can you please tell me what should I need to do here.
It is described in the warning message.
Either way, since your issue is unrelated to this repo, please ask your question at stackoverflow or somewhere else.
Alright, Thanks for the support @AkihiroSuda
Most helpful comment
I just placed
MAINTAINERat the top of my Dockerfile and got this error. It would be nice to have something slightly more elucidating, to be honest. Having said that, thanks for a fantastic tool.