Skip to content

Commit

Permalink
NFSHOME=1 should be working now
Browse files Browse the repository at this point in the history
  • Loading branch information
traceypooh committed Mar 13, 2024
1 parent be254af commit 1807be9
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 25 deletions.
3 changes: 0 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,6 @@ curl -sS https://internetarchive.github.io/hind/install.sh | sudo sh -s -- -e NF
- `-e ON_DEMAND_TLS_ASK=[URL]`
- If you want to use caddy `on_demand_tls`, URL to use to respond with 200/400 status codes.
- @see https://caddy.community/t/11179
- `-v /home:/home`
- use this with `-e NFSHOME=1` to make the volume available to be mounted.
- You can change the first part to where home dirs live if not at `/home/` on the VM.
- `...`
- other command line arguments to pass on to the main container's `podman run` invocation,
like other `-v` volume mounts or otherwise.
Expand Down
43 changes: 21 additions & 22 deletions install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -20,32 +20,31 @@ podman -v > /dev/null || exit 1
--rm --name hind-init --pull=always -q "$@" ghcr.io/internetarchive/hind:main
)

# now run the new docker image in the background
# NOTE: the *SECOND LINE* is what differs here -- the other lines need to stay the same/matched
if [ "$HOST_UNAME" = Darwin ]; then
(
set -x
podman run --privileged --cgroupns=host \
-p 6000:4646 -p 8000:80 -p 4000:443 -v /sys/fs/cgroup:/sys/fs/cgroup:rw \
-v /var/lib/containers:/var/lib/containers \
-v /opt/nomad/data/alloc:/opt/nomad/data/alloc \
-v /pv:/pv \
--secret HIND_C,type=env --secret HIND_N,type=env \
--restart=always --name hind -d -q "$@" hind >/dev/null
)
ARGS='-p 6000:4646 -p 8000:80 -p 4000:443 -v /sys/fs/cgroup:/sys/fs/cgroup:rw'
else
ARGS='--net=host'
fi

if ( echo "$@" |grep -Fq NFSHOME= ); then
ARGS2='-v /home:/home'
else
(
set -x
podman run --privileged --cgroupns=host \
--net=host \
-v /var/lib/containers:/var/lib/containers \
-v /opt/nomad/data/alloc:/opt/nomad/data/alloc \
-v /pv:/pv \
--secret HIND_C,type=env --secret HIND_N,type=env \
--restart=always --name hind -d -q "$@" hind >/dev/null
)
ARGS2=''
fi

# now run the new docker image in the background
(
set -x
podman run --privileged --cgroupns=host \
$ARGS $ARGS2 \
-v /var/lib/containers:/var/lib/containers \
-v /opt/nomad/data/alloc:/opt/nomad/data/alloc \
-v /pv:/pv \
--secret HIND_C,type=env --secret HIND_N,type=env \
--restart=always --name hind -d -q "$@" hind >/dev/null
)


if [ ! $FIRST ]; then
echo '
Congratulations!
Expand Down

0 comments on commit 1807be9

Please sign in to comment.