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

error: argument command: invalid choice: 'exec' #71

Open
chriswalg opened this issue Nov 1, 2019 · 1 comment
Open

error: argument command: invalid choice: 'exec' #71

chriswalg opened this issue Nov 1, 2019 · 1 comment

Comments

@chriswalg
Copy link

chriswalg commented Nov 1, 2019

docker compose supports the exec command. This does not seem to support podman compose.

I get this message:

usage: podman-compose [-h] [-f file] [-p PROJECT_NAME] [--podman-path PODMAN_PATH] [--no-ansi] [--no-cleanup] [--dry-run] [-t {1pod,1podfw,hostnet,cntnet,publishall,identity}] {help,version,pull,push,build,up,down,ps,run,start,stop,restart} ... podman-compose: error: argument command: invalid choice: 'exec' (choose from 'help', 'version', 'pull', 'push', 'build', 'up', 'down', 'ps', 'run', 'start', 'stop', 'restart')

@chriswalg
Copy link
Author

chriswalg commented Nov 1, 2019

Than append this:


@cmd_run(podman_compose, 'exec', 'exec desc')
def compose_exec(compose, args):
     for pod in compose.pods:
        podman_args = [
            "exec"
        ]
        compose.podman.run(podman_args)
@cmd_parse(podman_compose, 'exec')
def compose_exec_parse(parser):
    parser.add_argument("-u", "--user", type=str, default=None,
        help="Run the command as this user.")
    parser.add_argument("-T", action='store_true',
        help="Disable pseudo-tty allocation. By default docker-compose exec allocates a TTY.")
    parser.add_argument("-d", "--detach", action='store_true',
        help="Detached mode: Run command in the background.")
    parser.add_argument("--privileged", action='append',
        help="Give extended privileges to the process.")
    parser.add_argument("-w", "--workdir", type=str, default=None,
        help="Path to workdir directory for this command.")
    parser.add_argument("sh", nargs='+',
        help="")
    parser.add_argument("-c", action='append',
        help="")

But I get this error message:

125
Creating directories
podman exec
Error: you must provide one container name or id
125
Done
Running composer install
podman exec
Error: you must provide one container name or id
125
podman exec
Error: you must provide one container name or id
125
Waiting for database
podman exec
Error: you must provide one container name or id
125
Creating database dev/foodsharing
podman exec
Error: you must provide one container name or id
125
Migrating database dev/foodsharing
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
devtmpfs on /dev type devtmpfs (rw,nosuid,size=8056096k,nr_inodes=2014024,mode=755)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,mode=755)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
/dev/nvme0n1p3 on / type ext4 (rw,relatime)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=20098)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
/var/lib/snapd/snaps/core_7713.snap on /var/lib/snapd/snap/core/7713 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core18_1223.snap on /var/lib/snapd/snap/core18/1223 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core_7917.snap on /var/lib/snapd/snap/core/7917 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/discord_93.snap on /var/lib/snapd/snap/discord/93 type squashfs (ro,nodev,relatime,x-gdu.hide)
/dev/nvme0n1p4 on /home type ext4 (rw,relatime)
/dev/nvme0n1p1 on /boot/efi type vfat (rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=winnt,errors=remount-ro)
/var/lib/snapd/snaps/gnome-3-26-1604_94.snap on /var/lib/snapd/snap/gnome-3-26-1604/94 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gtk-common-themes_1353.snap on /var/lib/snapd/snap/gtk-common-themes/1353 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/core18_1192.snap on /var/lib/snapd/snap/core18/1192 type squashfs (ro,nodev,relatime,x-gdu.hide)
/var/lib/snapd/snaps/gnome-3-26-1604_97.snap on /var/lib/snapd/snap/gnome-3-26-1604/97 type squashfs (ro,nodev,relatime,x-gdu.hide)
sunrpc on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=1614992k,mode=700,uid=1000,gid=1000)
gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
tmpfs on /run/netns type tmpfs (rw,nosuid,nodev,mode=755)
usage: podman-compose [-h] [-f file] [-p PROJECT_NAME]
                      [--podman-path PODMAN_PATH] [--no-ansi] [--no-cleanup]
                      [--dry-run]
                      [-t {1pod,1podfw,hostnet,cntnet,publishall,identity}]
                      {help,version,pull,push,build,up,down,ps,run,start,stop,restart,exec}
                      ...
podman-compose: error: unrecognized arguments: db
./scripts/inc.sh: Zeile 145: migrations/_all.sql: Keine Berechtigung
Executing sql file dev/foodsharing migrations/_all.sql
podman exec
Error: you must provide one container name or id
125
Error: you must provide one container name or id
usage: podman-compose [-h] [-f file] [-p PROJECT_NAME]
                      [--podman-path PODMAN_PATH] [--no-ansi] [--no-cleanup]
                      [--dry-run]
                      [-t {1pod,1podfw,hostnet,cntnet,publishall,identity}]
                      {help,version,pull,push,build,up,down,ps,run,start,stop,restart,exec}
                      ...
podman-compose: error: unrecognized arguments: --password=root foodsharing --extended-insert --quick --no-create-info --single-transaction --disable-keys --no-autocommit --skip-add-locks
usage: podman-compose [-h] [-f file] [-p PROJECT_NAME]
                      [--podman-path PODMAN_PATH] [--no-ansi] [--no-cleanup]
                      [--dry-run]
                      [-t {1pod,1podfw,hostnet,cntnet,publishall,identity}]
                      {help,version,pull,push,build,up,down,ps,run,start,stop,restart,exec}
                      ...
podman-compose: error: unrecognized arguments: app
./scripts/inc.sh: Zeile 156: migrations/_reload_data.sql: Keine Berechtigung

  Go visit http://localhost:18080 now!

  ...on your first run will take some time

  Or view logs with:

    ./scripts/docker-compose logs -f

  Or seed the db with some data:

    ./scripts/seed

  You can find more useful information at:

    https://devdocs.foodsharing.network/setting-things-up.html

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

1 participant