@@ -30,31 +30,31 @@ Commands include:
30
30
31
31
For each of the above, you can export:
32
32
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
35
35
]] )
36
36
37
37
{% 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 " , " " )
40
40
41
41
-- we probably don't need this
42
42
local MODULEPATH = " {{ module_dir }}"
43
43
44
44
-- interactive shell to any container, plus exec for aliases
45
45
local containerPath = ' {{ image }}'
46
46
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
48
48
-- 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
52
52
53
53
-- set_shell_function takes bashStr and cshStr
54
54
set_shell_function (" {|module_name|}-shell" , shellCmd , shellCmd )
55
55
56
56
-- 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 % })
58
58
59
59
-- exec functions to provide "alias" to module commands
60
60
{% if aliases % }{% for alias in aliases % }
0 commit comments