@@ -30,31 +30,31 @@ Commands include:
3030
3131For each of the above, you can export:
3232
33- - DOCKER_OPTS : to define custom options for {{ command }}
34- - DOCKER_COMMAND_OPTS : to define custom options for the command
33+ - PODMAN_OPTS : to define custom options for {{ command }}
34+ - PODMAN_COMMAND_OPTS : to define custom options for the command
3535]] )
3636
3737{% if podman_module % }load (" {{ podman_module }}" ){% endif % }
38- setenv (" DOCKER_OPTS " , " " )
39- setenv (" DOCKER_COMMAND_OPTS " , " " )
38+ setenv (" PODMAN_OPTS " , " " )
39+ setenv (" PODMAN_COMMAND_OPTS " , " " )
4040
4141-- we probably don't need this
4242local MODULEPATH = " {{ module_dir }}"
4343
4444-- interactive shell to any container, plus exec for aliases
4545local containerPath = ' {{ image }}'
4646
47- local shellCmd = " {{ command }} ${DOCKER_OPTS } run -i{% if tty %}t{% endif %} ${DOCKER_COMMAND_OPTS } -u `id -u`:`id -g` --rm --entrypoint {{ shell }} {% if envfile %}--env-file {{ module_dir }}/{{ envfile }}{% endif %} {% if bindpaths %}-v {{ bindpaths }} {% endif %} -v ${PWD} -w ${PWD} " .. containerPath
47+ local shellCmd = " {{ command }} ${PODMAN_OPTS } run -i{% if tty %}t{% endif %} ${PODMAN_COMMAND_OPTS } -u `id -u`:`id -g` --rm --entrypoint {{ shell }} {% if envfile %}--env-file {{ module_dir }}/{{ envfile }}{% endif %} {% if bindpaths %}-v {{ bindpaths }} {% endif %} -v ${PWD} -w ${PWD} " .. containerPath
4848-- execCmd needs entrypoint to be the executor
49- local execCmd = " {{ command }} ${DOCKER_OPTS } run ${DOCKER_COMMAND_OPTS } -i{% if tty %}t{% endif %} -u `id -u`:`id -g` --rm {% if envfile %}--env-file {{ module_dir }}/{{ envfile }}{% endif %} {% if bindpaths %}-v {{ bindpaths }} {% endif %} -v ${PWD} -w ${PWD} "
50- local runCmd = " {{ command }} ${DOCKER_OPTS } run ${DOCKER_COMMAND_OPTS } -i{% if tty %}t{% endif %} -u `id -u`:`id -g` --rm {% if envfile %}--env-file {{ module_dir }}/{{ envfile }}{% endif %} {% if bindpaths %}-v {{ bindpaths }} {% endif %} -v ${PWD} -w ${PWD} " .. containerPath
51- local inspectCmd = " {{ command }} ${DOCKER_OPTS } inspect ${DOCKER_COMMAND_OPTS } " .. containerPath
49+ local execCmd = " {{ command }} ${PODMAN_OPTS } run ${PODMAN_COMMAND_OPTS } -i{% if tty %}t{% endif %} -u `id -u`:`id -g` --rm {% if envfile %}--env-file {{ module_dir }}/{{ envfile }}{% endif %} {% if bindpaths %}-v {{ bindpaths }} {% endif %} -v ${PWD} -w ${PWD} "
50+ local runCmd = " {{ command }} ${PODMAN_OPTS } run ${PODMAN_COMMAND_OPTS } -i{% if tty %}t{% endif %} -u `id -u`:`id -g` --rm {% if envfile %}--env-file {{ module_dir }}/{{ envfile }}{% endif %} {% if bindpaths %}-v {{ bindpaths }} {% endif %} -v ${PWD} -w ${PWD} " .. containerPath
51+ local inspectCmd = " {{ command }} ${PODMAN_OPTS } inspect ${PODMAN_COMMAND_OPTS } " .. containerPath
5252
5353-- set_shell_function takes bashStr and cshStr
5454set_shell_function (" {|module_name|}-shell" , shellCmd , shellCmd )
5555
5656-- conflict with modules with the same name
57- conflict (myModuleName (){% if aliases % }{% for alias in aliases % }," {{ alias.name }}" {% endfor % }{% endif % })
57+ conflict (myModuleName (){% if aliases % }{% for alias in aliases % }{ % if alias . name != name % } ," {{ alias.name }}" { % endif % } {% endfor % }{% endif % })
5858
5959-- exec functions to provide "alias" to module commands
6060{% if aliases % }{% for alias in aliases % }
0 commit comments