@@ -29,22 +29,20 @@ function waiting_process {
2929 done
3030}
3131
32- # Start podman service
33- export DOCKER_PORT=1234
34- export DOCKER_HOST=tcp://127.0.0.1:${DOCKER_PORT}
35-
3632log_level=" error"
3733if [[ " ${DRYCC_DEBUG} " ]]; then
3834 log_level=" debug"
3935 unset DRYCC_DEBUG
4036fi
4137
38+ mkdir -p " ${HOME} " /.config/containers
39+ cp -rf /opt/drycc/podman/etc/containers/* " ${HOME} " /.config/containers
4240registries=" /etc/imagebuilder/registries.conf"
4341if [ -f " ${registries} " ]; then
44- cat " ${registries} " > /opt/drycc/podman/etc /containers/registries.conf
42+ cat " ${registries} " > " ${HOME} " /.config /containers/registries.conf
4543fi
4644
47- podman system service --time 0 tcp:0.0.0.0: ${DOCKER_PORT} &
45+ podman system service --time 0 &
4846
4947waiting_process podman
5048if [[ -n " ${TAR_PATH} " ]]; then
@@ -68,15 +66,14 @@ if [[ "${DRYCC_REGISTRY_LOCATION}" == "off-cluster" ]] ; then
6866else
6967 # Start registry proxy
7068 registry=" ${DRYCC_REGISTRY_PROXY_HOST} :${DRYCC_REGISTRY_PROXY_PORT} "
71- if [[ ${log_level} == " debug" ]] ; then
72- output=" /dev/stdout"
73- else
74- output=" /dev/null"
75- fi
76- caddy reverse-proxy \
69+
70+ caddy_command=" caddy reverse-proxy \
7771 --from " :${DRYCC_REGISTRY_PROXY_PORT} " \
78- --to " ${DRYCC_REGISTRY_SERVICE_HOST} :${DRYCC_REGISTRY_SERVICE_PORT} " \
79- > " ${output} " 2>&1 &
72+ --to " ${DRYCC_REGISTRY_SERVICE_HOST} :${DRYCC_REGISTRY_SERVICE_PORT} " "
73+ if [[ ${log_level} != " debug" ]] ; then
74+ caddy_command=" ${caddy_command} > /dev/null"
75+ fi
76+ $caddy_command 2>&1 &
8077 waiting_process caddy
8178 podman login \
8279 --username drycc \
@@ -105,6 +102,9 @@ if [[ "${DRYCC_STACK}" == "container" ]] ; then
105102else
106103 echo " ---> Building pack"
107104 echo " ---> Using builder ${pack_builder} "
105+ # podman connection
106+ readonly DOCKER_HOST=" unix://$( podman info -f " {{.Host.RemoteSocket.Path}}" ) "
107+ export DOCKER_HOST
108108 pack_command=" pack build ${image_repo} \
109109 --builder ${pack_builder} \
110110 --docker-host ${DOCKER_HOST} \
113113 --publish \
114114 --cache-image ${image_cache_repo} \
115115 --tag ${image_latest_repo} \
116- --network host \
117- --verbose"
116+ --network host"
118117 if [[ $log_level == " debug" ]] ; then
119118 pack_command=" $pack_command --verbose"
120119 fi
0 commit comments