diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..d3da531 --- /dev/null +++ b/.gitignore @@ -0,0 +1,3 @@ +etc/tmp.hcl +etc/ux-b*.hcl +etc/ux-b*.json diff --git a/etc/mac.md b/etc/mac.md index 0f8f502..110676d 100644 --- a/etc/mac.md +++ b/etc/mac.md @@ -1,5 +1,16 @@ # mac with HinD notes + +```sh +# `-p` -- run from inside `podman machine ssh` or outside -- can get to from everywhere +PORT=8080; podman run -p $PORT:$PORT --rm -it python:3-alpine sh -c 'python3 -c "import http.server; httpd = http.server.HTTPServer((\"0.0.0.0\", '$PORT'), http.server.SimpleHTTPRequestHandler); httpd.serve_forever()"' + +# `--net=host` -- can get to from inside machine ssh -- but not from outside or browser +podman machine ssh +PORT=8080; podman run --net=host --rm -it python:3-alpine sh -c 'python3 -c "import http.server; httpd = http.server.HTTPServer((\"0.0.0.0\", '$PORT'), http.server.SimpleHTTPRequestHandler); httpd.serve_forever()"' +``` + + ## run locally ```sh perl -i -pe 's/podman pull/#podman pull/' install.sh diff --git a/install.sh b/install.sh index b20aa2f..c760dd4 100755 --- a/install.sh +++ b/install.sh @@ -39,7 +39,7 @@ if [ $HOST_UNAME = Darwin ]; then ARGS_SEC="--cap-add SYS_ADMIN --security-opt seccomp=unconfined" ARGS_INIT="$ARGS_SEC" - ARGS_RUN="$ARGS_SEC $ARGS_RUN -p 8000:80 -p 4000:443" + ARGS_RUN="$ARGS_SEC $ARGS_RUN -p 8000:80 -p 4000:443 -p 5555:5000" else PV=/pv # Use host characteristics