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

rocker images are placed into default context #203

Open
karlhm76 opened this issue Oct 16, 2022 · 1 comment
Open

rocker images are placed into default context #203

karlhm76 opened this issue Oct 16, 2022 · 1 comment
Labels
enhancement New feature or request help wanted Extra attention is needed

Comments

@karlhm76
Copy link

Hello,

I have been able to use rocker to create a docker image for ROS development but the image is created in the default context. I generally use a different docker context due to using management tools and development tools.

There seems to be no way to direct the image to be created in a different context other than default.

I have changed the CLI docker context to the correct one prior to running the rocker command, I have also set the DOCKER_CONTEXT environment variable. Neither of these has any effect on where the image is created.

It would be ideal if rocker could detect the current context and create the images in that context.

`$ rocker osrf/ros:noetic-desktop-full bash --x11
Extension volume doesn't support default arguments. Please extend it.
Active extensions ['x11']
Writing dockerfile to /tmp/tmpi31oupme/Dockerfile
vvvvvv

Preamble from extension [x11]

FROM osrf/ros:noetic-desktop-full
USER root

Snippet from extension [x11]

^^^^^^
Building docker file with arguments: {'path': '/tmp/tmpi31oupme', 'rm': True, 'nocache': False, 'pull': False}
building > Step 1/2 : FROM osrf/ros:noetic-desktop-full
building > ---> fa623f74fdb4
building > Step 2/2 : USER root
building > ---> Running in a39252e2bbfb
building > Removing intermediate container a39252e2bbfb
building > ---> 23a704122dca
building > Successfully built 23a704122dca
Executing command:
docker run --rm -it -e DISPLAY -e TERM -e QT_X11_NO_MITSHM=1 -e XAUTHORITY=/tmp/.dockerazsql75c.xauth -v /tmp/.dockerazsql75c.xauth:/tmp/.dockerazsql75c.xauth -v /tmp/.X11-unix:/tmp/.X11-unix -v /etc/localtime:/etc/localtime:ro 23a704122dca bash
Unable to find image '23a704122dca:latest' locally
docker: Error response from daemon: pull access denied for 23a704122dca, repository does not exist or may require 'docker login': denied: requested access to the resource is denied.
See 'docker run --help'.`

checking images in desktop-linux context:
$ export DOCKER_CONTEXT=desktop-linux $ docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE portainer/portainer-docker-extension 2.15.1 500504ac663a 4 weeks ago 285MB osrf/ros noetic-desktop-full 16ee7f7bf08e 6 weeks ago 3.44GB

checking images in default context:
$ export DOCKER_CONTEXT=default $ docker image ls REPOSITORY TAG IMAGE ID CREATED SIZE <none> <none> 23a704122dca 17 minutes ago 3.44GB osrf/ros noetic-desktop-full fa623f74fdb4 10 days ago 3.44GB
Thank you.

@tfoote tfoote added enhancement New feature or request help wanted Extra attention is needed labels Nov 4, 2022
@tfoote
Copy link
Collaborator

tfoote commented Nov 4, 2022

This looks like a great feature to add to rocker. I haven't used contexts much myself but they look powerful for other use cases and don't look to complicated for rocker to interact with.

Detecting the context and passing it through as well as being able to override it from the command line options would be a great capability to add to rocker.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request help wanted Extra attention is needed
Projects
None yet
Development

No branches or pull requests

2 participants