Skip to content

Commit

Permalink
bootstrap fix. mac setup simplify
Browse files Browse the repository at this point in the history
  • Loading branch information
traceypooh committed Mar 30, 2024
1 parent ff65503 commit ee44179
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 7 deletions.
4 changes: 4 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,10 @@ ENV REVERSE_PROXY ""
ENV ON_DEMAND_TLS_ASK ""
ENV HOST_UNAME Linux

# replaced at runtime:
ENV HIND_N "VEhJUy1HRVRTLVJFUExBQ0VELUlULURPRVMtUklMTFk="
ENV HIND_C "VEhJUy1HRVRTLVJFUExBQ0VELUlULURPRVMtUklMTFk="

ENV DEBIAN_FRONTEND noninteractive
ENV TZ Etc/UTC
ENV TERM xterm
Expand Down
10 changes: 3 additions & 7 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,8 +35,8 @@ else
# container will effect us, the outside/VM.
VLC=$(realpath /var/lib/containers 2>/dev/null || echo /var/lib/containers)
SOCK=$(podman info |grep -F podman.sock |rev |cut -f1 -d ' ' |rev)
ARGS_INIT="--net=host -v ${VLC}:/var/lib/containers"
ARGS_RUN="--net=host --cgroupns=host -v /opt/nomad/data/alloc:/opt/nomad/data/alloc -v $SOCK:$SOCK"
ARGS_INIT="--net=host --cgroupns=host -v ${VLC}:/var/lib/containers"
ARGS_RUN="--net=host --cgroupns=host -v /opt/nomad/data/alloc:/opt/nomad/data/alloc -v $SOCK:$SOCK --secret HIND_C,type=env --secret HIND_N,type=env"
PV=/pv
fi

Expand Down Expand Up @@ -66,7 +66,7 @@ fi
mkdir -p -m777 /opt/nomad/data/alloc

podman pull $QUIET $IMG > $OUT
podman run --privileged --cgroupns=host \
podman run --privileged \
$ARGS_INIT \
-e FQDN -e HOST_UNAME \
--name hind-init $QUIET "$@" $IMG
Expand All @@ -76,9 +76,6 @@ fi


if [ "$HOST_UNAME" = Darwin ]; then
echo VEhJUy1HRVRTLVJFUExBQ0VELUlULURPRVMtUklMTFk= |tr -d '\n' | podman secret create HIND_C -
echo VEhJUy1HRVRTLVJFUExBQ0VELUlULURPRVMtUklMTFk= |tr -d '\n' | podman secret create HIND_N -

set +x
echo '
Expand All @@ -98,7 +95,6 @@ fi
podman run --privileged \
$ARGS_RUN \
-v $PV:/pv \
--secret HIND_C,type=env --secret HIND_N,type=env \
--restart=always --name hind -d $QUIET "$@" localhost/hind > $OUT 2>&1
)

Expand Down

0 comments on commit ee44179

Please sign in to comment.