-
Notifications
You must be signed in to change notification settings - Fork 2.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #21532 from rhatdan/docker
[CI:DOCS] Handle DOCKER_HOST environment for podman-docker package
- Loading branch information
Showing
5 changed files
with
66 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -840,14 +840,14 @@ ifneq ($(shell uname -s),FreeBSD) | |
ln -sfr $(DESTDIR)$(LIBEXECPODMAN)/quadlet $(DESTDIR)$(SYSTEMDGENERATORSDIR)/podman-system-generator | ||
install ${SELINUXOPT} -d -m 755 $(DESTDIR)$(USERSYSTEMDGENERATORSDIR) | ||
ln -sfr $(DESTDIR)$(LIBEXECPODMAN)/quadlet $(DESTDIR)$(USERSYSTEMDGENERATORSDIR)/podman-user-generator | ||
install ${SELINUXOPT} -m 755 -d ${DESTDIR}${TMPFILESDIR} | ||
install ${SELINUXOPT} -m 644 contrib/tmpfile/podman.conf ${DESTDIR}${TMPFILESDIR}/podman.conf | ||
install ${SELINUXOPT} -m 755 -d $(DESTDIR)${TMPFILESDIR} | ||
install ${SELINUXOPT} -m 644 contrib/tmpfile/podman.conf $(DESTDIR)${TMPFILESDIR}/podman.conf | ||
endif | ||
|
||
.PHONY: install.modules-load | ||
install.modules-load: # This should only be used by distros which might use iptables-legacy, this is not needed on RHEL | ||
install ${SELINUXOPT} -m 755 -d ${DESTDIR}${MODULESLOADDIR} | ||
install ${SELINUXOPT} -m 644 contrib/modules-load.d/podman-iptables.conf ${DESTDIR}${MODULESLOADDIR}/podman-iptables.conf | ||
install ${SELINUXOPT} -m 755 -d $(DESTDIR)${MODULESLOADDIR} | ||
install ${SELINUXOPT} -m 644 contrib/modules-load.d/podman-iptables.conf $(DESTDIR)${MODULESLOADDIR}/podman-iptables.conf | ||
|
||
.PHONY: install.man | ||
install.man: | ||
|
@@ -860,27 +860,30 @@ install.man: | |
|
||
.PHONY: install.completions | ||
install.completions: | ||
install ${SELINUXOPT} -d -m 755 ${DESTDIR}${BASHINSTALLDIR} | ||
install ${SELINUXOPT} -m 644 completions/bash/podman ${DESTDIR}${BASHINSTALLDIR} | ||
install ${SELINUXOPT} -m 644 completions/bash/podman-remote ${DESTDIR}${BASHINSTALLDIR} | ||
install ${SELINUXOPT} -d -m 755 ${DESTDIR}${ZSHINSTALLDIR} | ||
install ${SELINUXOPT} -m 644 completions/zsh/_podman ${DESTDIR}${ZSHINSTALLDIR} | ||
install ${SELINUXOPT} -m 644 completions/zsh/_podman-remote ${DESTDIR}${ZSHINSTALLDIR} | ||
install ${SELINUXOPT} -d -m 755 ${DESTDIR}${FISHINSTALLDIR} | ||
install ${SELINUXOPT} -m 644 completions/fish/podman.fish ${DESTDIR}${FISHINSTALLDIR} | ||
install ${SELINUXOPT} -m 644 completions/fish/podman-remote.fish ${DESTDIR}${FISHINSTALLDIR} | ||
install ${SELINUXOPT} -d -m 755 $(DESTDIR)${BASHINSTALLDIR} | ||
install ${SELINUXOPT} -m 644 completions/bash/podman $(DESTDIR)${BASHINSTALLDIR} | ||
install ${SELINUXOPT} -m 644 completions/bash/podman-remote $(DESTDIR)${BASHINSTALLDIR} | ||
install ${SELINUXOPT} -d -m 755 $(DESTDIR)${ZSHINSTALLDIR} | ||
install ${SELINUXOPT} -m 644 completions/zsh/_podman $(DESTDIR)${ZSHINSTALLDIR} | ||
install ${SELINUXOPT} -m 644 completions/zsh/_podman-remote $(DESTDIR)${ZSHINSTALLDIR} | ||
install ${SELINUXOPT} -d -m 755 $(DESTDIR)${FISHINSTALLDIR} | ||
install ${SELINUXOPT} -m 644 completions/fish/podman.fish $(DESTDIR)${FISHINSTALLDIR} | ||
install ${SELINUXOPT} -m 644 completions/fish/podman-remote.fish $(DESTDIR)${FISHINSTALLDIR} | ||
# There is no common location for powershell files so do not install them. Users have to source the file from their powershell profile. | ||
|
||
.PHONY: install.docker | ||
install.docker: | ||
install ${SELINUXOPT} -d -m 755 $(DESTDIR)$(BINDIR) | ||
$(eval INTERPOLATED_DOCKER_SCRIPT := $(shell mktemp)) | ||
env BINDIR=${BINDIR} ETCDIR=${ETCDIR} envsubst < docker.in > ${INTERPOLATED_DOCKER_SCRIPT} | ||
env BINDIR=${BINDIR} ETCDIR=${ETCDIR} envsubst < docker/docker.in > ${INTERPOLATED_DOCKER_SCRIPT} | ||
install ${SELINUXOPT} -m 755 ${INTERPOLATED_DOCKER_SCRIPT} $(DESTDIR)$(BINDIR)/docker | ||
rm ${INTERPOLATED_DOCKER_SCRIPT} | ||
install ${SELINUXOPT} -m 755 -d ${DESTDIR}${SYSTEMDDIR} ${DESTDIR}${USERSYSTEMDDIR} ${DESTDIR}${TMPFILESDIR} ${DESTDIR}${USERTMPFILESDIR} | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman-docker.conf -t ${DESTDIR}${TMPFILESDIR} | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman-docker.conf -t ${DESTDIR}${USERTMPFILESDIR} | ||
install ${SELINUXOPT} -m 755 -d $(DESTDIR)${SYSTEMDDIR} $(DESTDIR)${USERSYSTEMDDIR} $(DESTDIR)${TMPFILESDIR} $(DESTDIR)${USERTMPFILESDIR} | ||
install ${SELINUXOPT} -d -m 755 $(DESTDIR)${ETCDIR}/profile.d | ||
install ${SELINUXOPT} -m 644 docker/podman-docker.sh $(DESTDIR)${ETCDIR}/profile.d/podman-docker.sh | ||
install ${SELINUXOPT} -m 644 docker/podman-docker.csh $(DESTDIR)${ETCDIR}/profile.d/podman-docker.csh | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman-docker.conf -t $(DESTDIR)${TMPFILESDIR} | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman-docker.conf -t $(DESTDIR)${USERTMPFILESDIR} | ||
|
||
.PHONY: install.docker-docs | ||
install.docker-docs: | ||
|
@@ -905,22 +908,22 @@ PODMAN_UNIT_FILES = contrib/systemd/auto-update/podman-auto-update.service \ | |
&& mv -f $@.tmp.$$ $@ | ||
|
||
install.systemd: $(PODMAN_UNIT_FILES) | ||
install ${SELINUXOPT} -m 755 -d ${DESTDIR}${SYSTEMDDIR} ${DESTDIR}${USERSYSTEMDDIR} | ||
install ${SELINUXOPT} -m 755 -d $(DESTDIR)${SYSTEMDDIR} $(DESTDIR)${USERSYSTEMDDIR} | ||
# User services | ||
install ${SELINUXOPT} -m 644 contrib/systemd/auto-update/podman-auto-update.service ${DESTDIR}${USERSYSTEMDDIR}/podman-auto-update.service | ||
install ${SELINUXOPT} -m 644 contrib/systemd/auto-update/podman-auto-update.timer ${DESTDIR}${USERSYSTEMDDIR}/podman-auto-update.timer | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman.socket ${DESTDIR}${USERSYSTEMDDIR}/podman.socket | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman.service ${DESTDIR}${USERSYSTEMDDIR}/podman.service | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman-restart.service ${DESTDIR}${USERSYSTEMDDIR}/podman-restart.service | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/[email protected] ${DESTDIR}${USERSYSTEMDDIR}/[email protected] | ||
install ${SELINUXOPT} -m 644 contrib/systemd/auto-update/podman-auto-update.service $(DESTDIR)${USERSYSTEMDDIR}/podman-auto-update.service | ||
install ${SELINUXOPT} -m 644 contrib/systemd/auto-update/podman-auto-update.timer $(DESTDIR)${USERSYSTEMDDIR}/podman-auto-update.timer | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman.socket $(DESTDIR)${USERSYSTEMDDIR}/podman.socket | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman.service $(DESTDIR)${USERSYSTEMDDIR}/podman.service | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman-restart.service $(DESTDIR)${USERSYSTEMDDIR}/podman-restart.service | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/[email protected] $(DESTDIR)${USERSYSTEMDDIR}/[email protected] | ||
# System services | ||
install ${SELINUXOPT} -m 644 contrib/systemd/auto-update/podman-auto-update.service ${DESTDIR}${SYSTEMDDIR}/podman-auto-update.service | ||
install ${SELINUXOPT} -m 644 contrib/systemd/auto-update/podman-auto-update.timer ${DESTDIR}${SYSTEMDDIR}/podman-auto-update.timer | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman.socket ${DESTDIR}${SYSTEMDDIR}/podman.socket | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman.service ${DESTDIR}${SYSTEMDDIR}/podman.service | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman-restart.service ${DESTDIR}${SYSTEMDDIR}/podman-restart.service | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/[email protected] ${DESTDIR}${SYSTEMDDIR}/[email protected] | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman-clean-transient.service ${DESTDIR}${SYSTEMDDIR}/podman-clean-transient.service | ||
install ${SELINUXOPT} -m 644 contrib/systemd/auto-update/podman-auto-update.service $(DESTDIR)${SYSTEMDDIR}/podman-auto-update.service | ||
install ${SELINUXOPT} -m 644 contrib/systemd/auto-update/podman-auto-update.timer $(DESTDIR)${SYSTEMDDIR}/podman-auto-update.timer | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman.socket $(DESTDIR)${SYSTEMDDIR}/podman.socket | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman.service $(DESTDIR)${SYSTEMDDIR}/podman.service | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman-restart.service $(DESTDIR)${SYSTEMDDIR}/podman-restart.service | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/[email protected] $(DESTDIR)${SYSTEMDDIR}/[email protected] | ||
install ${SELINUXOPT} -m 644 contrib/systemd/system/podman-clean-transient.service $(DESTDIR)${SYSTEMDDIR}/podman-clean-transient.service | ||
rm -f $(PODMAN_UNIT_FILES) | ||
else | ||
install.systemd: | ||
|
@@ -994,15 +997,15 @@ uninstall: | |
rm -f $(DESTDIR)$(BINDIR)/podman | ||
rm -f $(DESTDIR)$(BINDIR)/podman-remote | ||
# Remove related config files | ||
rm -f ${DESTDIR}${ETCDIR}/cni/net.d/87-podman-bridge.conflist | ||
rm -f ${DESTDIR}${TMPFILESDIR}/podman.conf | ||
rm -f ${DESTDIR}${SYSTEMDDIR}/io.podman.socket | ||
rm -f ${DESTDIR}${USERSYSTEMDDIR}/io.podman.socket | ||
rm -f ${DESTDIR}${SYSTEMDDIR}/io.podman.service | ||
rm -f ${DESTDIR}${SYSTEMDDIR}/podman.service | ||
rm -f ${DESTDIR}${SYSTEMDDIR}/podman.socket | ||
rm -f ${DESTDIR}${USERSYSTEMDDIR}/podman.socket | ||
rm -f ${DESTDIR}${USERSYSTEMDDIR}/podman.service | ||
rm -f $(DESTDIR)${ETCDIR}/cni/net.d/87-podman-bridge.conflist | ||
rm -f $(DESTDIR)${TMPFILESDIR}/podman.conf | ||
rm -f $(DESTDIR)${SYSTEMDDIR}/io.podman.socket | ||
rm -f $(DESTDIR)${USERSYSTEMDDIR}/io.podman.socket | ||
rm -f $(DESTDIR)${SYSTEMDDIR}/io.podman.service | ||
rm -f $(DESTDIR)${SYSTEMDDIR}/podman.service | ||
rm -f $(DESTDIR)${SYSTEMDDIR}/podman.socket | ||
rm -f $(DESTDIR)${USERSYSTEMDDIR}/podman.socket | ||
rm -f $(DESTDIR)${USERSYSTEMDDIR}/podman.service | ||
|
||
.PHONY: clean-binaries | ||
clean-binaries: ## Remove platform/architecture specific binary files | ||
|
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
# DOCKER_HOST initialization | ||
|
||
if ($?DOCKER_HOST) exit | ||
if ( "$euid" == 0 ) then | ||
setenv DOCKER_HOST unix:///run/podman/podman.sock | ||
else | ||
if ($?XDG_RUNTIME_DIR) then | ||
setenv DOCKER_HOST unix://$XDG_RUNTIME_DIR/podman/podman.sock | ||
endif | ||
endif |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
# DOCKER_HOST initialization | ||
|
||
if [ -z "$DOCKER_HOST" ]; then | ||
if [ $(id -u) -eq 0 ]; then | ||
export DOCKER_HOST=unix:///run/podman/podman.sock | ||
else | ||
if [ -n "$XDG_RUNTIME_DIR" ]; then | ||
export DOCKER_HOST=unix://$XDG_RUNTIME_DIR/podman/podman.sock | ||
fi | ||
fi | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3691f84
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
podman-next COPR build failed. @containers/packit-build please check.