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

Add helper script and integrate with ssh-agent #90

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

amsobr
Copy link

@amsobr amsobr commented Nov 18, 2022

Added a script, poky-container, which can be used to simplify the listing and launching of the available containers.

Listing available containers

Note: the list of containers is maintained by hand.

 poky-container list
AlmaLinux:
    alma-8 alma-9

CentOS:
    centos-7

Debian:
    debian-9 debian-10 debian-11

Fedora:
    fedora-33 fedora-34 fedora-35 fedora-36

OpenSuse:
    opensuse-15.2 opensuse-15.3 opensuse-15.4

Ubuntu:
    ubuntu-16.04 ubuntu-18.04 ubuntu-20.04 ubuntu-22.04

Launching a container

user@host$ poky-container run ubuntu-20.04
...
pokyuser@4da677d43c61:/workdir$ 

Basic help

user@host$ poky-container help
Usage:
    poky-container list
                List available images

    poky-container run IMAGE [HOST_WORKDIR]
                Run the selected image on a specific location

Parameters:
    IMAGE           The name of the image to run
    HOST_WORKDIR    The working directory, ie, location if the workspace
                    on the host, which will show as /workdir in the
                    container.
                    By default, the current working directory is used.

ssh-agent integration

When launching the container, if SSH_AUTH_SOCK is set, the socket is bind-mounted in the container too and ~/.bashrc in the container recreates the SSH_AUTH_SOCK variable.

Feel free to pick any of the changes or suggest improvements.
Thanks.

* poky-container: helper script to list available containers and
  running a container without the need to remember complex commands.
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

Successfully merging this pull request may close these issues.

1 participant