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

display build errors #35

Open
tfoote opened this issue Feb 14, 2019 · 2 comments · May be fixed by #227
Open

display build errors #35

tfoote opened this issue Feb 14, 2019 · 2 comments · May be fixed by #227
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@tfoote
Copy link
Collaborator

tfoote commented Feb 14, 2019

When there's a build error the output in rocker is suppressed.

As you can see manually running the command afterwards shows that it's failing due to executable file not found. But the rocker build just ends with an error code and no information. It is an invalid configuration but that doesn't mean we shouldn't show the error message.

$ rocker --home --user hello-world --noex
Plugins found: ['dev_helpers', 'home', 'nvidia', 'pulse', 'user']
Active extensions ['home', 'user']
Writing dockerfile to /tmp/tmpwfb8q_7_/Dockerfile
vvvvvv
# Preamble from extension [home]

# Preamble from extension [user]


FROM hello-world
# Snippet from extension [home]

# Snippet from extension [user]
# make sure sudo is installed to be able to give user sudo access in docker
RUN apt-get update \
 && apt-get install -y \
    sudo \
 && apt-get clean

RUN useradd -U --uid 1000 -ms /bin/bash osrf \
 && echo "osrf:osrf" | chpasswd \
 && adduser osrf sudo \
 && echo "osrf ALL=NOPASSWD: ALL" >> /etc/sudoers.d/osrf
# Commands below run as the developer user
USER osrf


^^^^^^
Building docker file with arguments:  {'path': '/tmp/tmpwfb8q_7_', 'rm': True, 'decode': True, 'nocache': False, 'tag': 'rocker_hello-world_home_user'}
building > Step 1/4 : FROM hello-world
building >  ---> fce289e99eb9
building > Step 2/4 : RUN apt-get update  && apt-get install -y     sudo  && apt-get clean
building >  ---> Running in 6f95c70df683
2 osrf@osrf-toughpad1:~$ docker run -ti --rm 6f95c70df683
Unable to find image '6f95c70df683:latest' locally
docker: Error response from daemon: pull access denied for 6f95c70df683, repository does not exist or may require 'docker login'.
See 'docker run --help'.
125 osrf@osrf-toughpad1:~$ docker run -ti --rm fce289e99eb9 bash
docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"bash\": executable file not found in $PATH": unknown.
127 osrf@osrf-toughpad1:~$ docker run -ti --rm fce289e99eb9 sh
docker: Error response from daemon: OCI runtime create failed: container_linux.go:344: starting container process caused "exec: \"sh\": executable file not found in $PATH": unknown.
127 osrf@osrf-toughpad1:~$ docker run -ti --rm fce289e99eb9 

Hello from Docker!
This message shows that your installation appears to be working correctly.

To generate this message, Docker took the following steps:
 1. The Docker client contacted the Docker daemon.
 2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
    (amd64)
 3. The Docker daemon created a new container from that image which runs the
    executable that produces the output you are currently reading.
 4. The Docker daemon streamed that output to the Docker client, which sent it
    to your terminal.

To try something more ambitious, you can run an Ubuntu container with:
 $ docker run -it ubuntu bash

Share images, automate workflows, and more with a free Docker ID:
 https://hub.docker.com/

For more examples and ideas, visit:
 https://docs.docker.com/get-started/
@tfoote tfoote added enhancement New feature or request good first issue Good for newcomers labels Feb 14, 2019
@guptaaryan0405
Copy link

hello sir, I am Aryan Gupta a 1st-year student of Electronics engineering. I am very passionate about robotics and want to contribute to Open Robotics. I am fluent in Python and C. can you help me guide how to start as a beginner.

@tfoote
Copy link
Collaborator Author

tfoote commented Feb 10, 2021

Thanks for your interest. This project is mostly used as a development tool and infrastructure that can be used for robotics development.

If you'd like to take a look at this that would be great.

You can find the development environment setup here: https://github.com/osrf/rocker/blob/master/README.md

And with that you should be able to reproduce the above issue.

After that I believe that the docker_build function will need to be extended.

def docker_build(docker_client = None, output_callback = None, **kwargs):

And hopefully leverage some APIs from the python docker_client API to include the console output in the result stream.

If you have any questions feel free to follow up here.

BabaYaga1221 added a commit to BabaYaga1221/rocker that referenced this issue May 4, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants