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

toolbox: failed to enter custom ubuntu container #349

Closed
javithakthar opened this issue Dec 11, 2019 · 4 comments
Closed

toolbox: failed to enter custom ubuntu container #349

javithakthar opened this issue Dec 11, 2019 · 4 comments

Comments

@javithakthar
Copy link

javithakthar commented Dec 11, 2019

I've installed latest SilverBlue (31) in VM. I need a ubuntu based container for my work. From the readme file i found that it seems sudo support is required. So I created following docker file for custom ubuntu image with sudo utility included. Other than this I think remaining dependency requirements were already satisfied in the docker image.

FROM docker.io/library/ubuntu:18.04

LABEL com.github.containers.toolbox="true" \
      com.github.debarshiray.toolbox="true"

RUN apt-get update
RUN apt-get -y install sudo

CMD /bin/sh
$ buildah bud -t ubuntu-toolbox .

$ podman image list                                                                                                                                  REPOSITORY                                      TAG      IMAGE ID       CREATED             SIZE
localhost/ubuntu-toolbox                        latest   97415363bbe9   About an hour ago   95.6 MB
registry.fedoraproject.org/f31/fedora-toolbox   31       a198bc8c3cda   5 weeks ago         448 MB
docker.io/library/ubuntu                        18.04    775349758637   5 weeks ago         66.6 MB

$ toolbox create --container ubuntu-toolbox --image localhost/ubuntu-toolbox:latest

$ toolbox enter --container ubuntu-toolbox

It failed with unable to init the container message.

For workaround I issued following run cmd to container to keep it alive and then issued toolbox enter again

$ podman run -it ubuntu-toolbox /bin/sh

this time toolbox failed because unable to execute 'exec' command to container. So i cloned the toolbox script from this git repo and modified podman exec statments to podman run and gave it a try.

this time it failed fetching PID. so I commented exit 1 and following sleep statement to wait for container init (25secs I believe) to skip error check. It seems there are no further error messages. but the script simply exits.

My doubt is if podman run -it ubuntu-toolbox /bin/sh command works then toolbox enter also should work right? Or for the time being other than fedora is unsupported by toolbox? Someone Please help to clarify.

@markstos
Copy link

@javithakthar Could you try applying this patch that adds Ubuntu container support and see if it works for you? #298

Note that the Pull Request is for Ubuntu 19.04, but you were trying to use Ubuntu 18.04. You could extend the patch started there by copying the template for Ubuntu 19.04 support and see if it works for 18.04 as well by just modifying the Ubuntu version number.

@bureado
Copy link
Contributor

bureado commented Feb 1, 2020

@javithakthar, can you send us the output of toolbox -v enter instead? Just to make sure it's not related to #369

@javithakthar
Copy link
Author

Hi all,
Sorry for the the delayed update. I don't have the VM environment with me now. I'm afraid i'll not be able to provide any more inputs from my side besides the initial findings. Feel free to use the steps I mentioned in case if anyone interested to proceed further.

@debarshiray
Copy link
Member

I suspect that podman start --attach ubuntu-toolbox would have revealed something.

I am tentatively closing this now. Please feel free to re-open or leave a comment if you find something new.

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

4 participants