Skip to content
This repository has been archived by the owner on Feb 1, 2023. It is now read-only.

Can't get a full docker steps output on Linux #35

Closed
fbarl opened this issue Jun 2, 2020 · 5 comments · Fixed by #36
Closed

Can't get a full docker steps output on Linux #35

fbarl opened this issue Jun 2, 2020 · 5 comments · Fixed by #36
Labels
bug Something isn't working

Comments

@fbarl
Copy link
Contributor

fbarl commented Jun 2, 2020

When running brick build on my local Linux machine, I can't seem to get the docker build steps output that seem to be always present in the Drone builds.

Here is an example of what I get running with the latest master brick build and the --verbose flag:

fbarl@fbarl-XPS-15-9550 ~/Projects/tmrowco/tmrow/lighthouse.tmrow.com $ brick --verbose build
2020-05-29 15:28:50,288 [DEBUG] Using yarn cache located at /usr/local/share/.cache/yarn/v6
2020-05-29 15:28:50,288 [INFO] 🔨 Preparing lighthouse.tmrow.com..
2020-05-29 15:28:50,293 [DEBUG] docker build . --iidfile /tmp/tmpipjw7itq -f /home/fbarl/Projects/tmrowco/tmrow/.brickdockerfile
2020-05-29 15:28:53,354 [DEBUG] Tagging as lighthouse.tmrow.com_prepare:latest..
2020-05-29 15:28:53,387 [DEBUG] Tagging as lighthouse.tmrow.com_prepare:fbarl-3135-infer-json-schema-from-realm..
2020-05-29 15:28:53,408 [INFO] 💯 Preparation phase done!
2020-05-29 15:28:53,408 [INFO] 🔨 Building lighthouse.tmrow.com..
2020-05-29 15:28:53,452 [DEBUG] docker build . --iidfile /tmp/tmptdmbykri -f /home/fbarl/Projects/tmrowco/tmrow/.brickdockerfile
2020-05-29 15:30:01,694 [DEBUG] rpc error: code = Unknown desc = executor failed running [/bin/sh -c yarn build]: exit code: 1
2020-05-29 15:30:01,699 [ERROR] docker build . --iidfile /tmp/tmptdmbykri -f /home/fbarl/Projects/tmrowco/tmrow/.brickdockerfile
rpc error: code = Unknown desc = executor failed running [/bin/sh -c yarn build]: exit code: 1

@madsnedergaard seems to get the full steps output when running on his machine so it might depend on the running environment, here's my Docker env:

fbarl@fbarl-XPS-15-9550 ~ $ docker version
Client:
 Version:           18.09.7
 API version:       1.39
 Go version:        go1.10.4
 Git commit:        2d0083d
 Built:             Fri Aug 16 14:19:38 2019
 OS/Arch:           linux/amd64
 Experimental:      false

Server:
 Engine:
  Version:          18.09.7
  API version:      1.39 (minimum version 1.12)
  Go version:       go1.10.4
  Git commit:       2d0083d
  Built:            Thu Aug 15 15:12:41 2019
  OS/Arch:          linux/amd64
  Experimental:     false

p.s. I wonder if passing the digest stream straight to stdout in here could be a viable solution 😛

@fbarl fbarl added the bug Something isn't working label Jun 2, 2020
@madsnedergaard
Copy link
Member

CI (and I) are running Docker at 19.03.4, but I doubt that's the issue. We're also running on Linux in CI, so that shouldn't be it either 🤔

I'm running Docker with the following config, perhaps the debug flag is relevant for this?

{
  "experimental": false,
  "debug": true
}

https://docs.docker.com/config/daemon/

@corradio
Copy link
Member

corradio commented Jun 2, 2020

It could maybe come from the version of python used? Or maybe the version of dockerpy used?

@fbarl
Copy link
Contributor Author

fbarl commented Jun 2, 2020

I'm running Docker with the following config, perhaps the debug flag is relevant for this?

This seemed like a good guess to me so I tried it but it didn't make a difference - an important thing I forgot to note earlier is that I do get the steps output when running docker build command directly from my command line, so it's likely not a docker thing but either brick or one of the deps.

It could maybe come from the version of python used? Or maybe the version of dockerpy used?

Perhaps! My Python version is 3.6.4 and the docker lib version is 3.7.0 which both seem in line with the setup.py script though, so I'm not really sure 🤔

I'm checking https://github.com/docker/docker-py/issues for possible answers and I'll also try bumping my Docker version just to remove that as a possible cause.

@fbarl
Copy link
Contributor Author

fbarl commented Jun 2, 2020

Ok it was the Docker version all along (probably in combination with a Python docker lib issue) - upgrading to Docker 19.03.4 fixed it for me!

I'll add a note to the README for the future reference and then I think we can close this issue.

@madsnedergaard
Copy link
Member

Haha weird, but great that you found the fix! :)

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants