Skip to content

Commit

Permalink
Randomized ports are more pain than worth, just use 10443.
Browse files Browse the repository at this point in the history
  • Loading branch information
mvidner committed Jun 7, 2024
1 parent 0cddd65 commit 0fcc127
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
2 changes: 1 addition & 1 deletion doc/testing_using_container.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ script. That scripts does several steps:
(using the [setup.sh](../setup.sh) script)
- It asks for the new root password to allow logging in (by default there is
no root password set in containers)
- It provides web UI on a forwarded HTTPS port
- It provides web UI on a forwarded HTTPS port, <https://localhost:10443/>
- Starts a shell inside the container with root access for more testing or
debugging.
9 changes: 3 additions & 6 deletions testing_using_container.sh
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
#
# Details:
# - container name: agama
# - SSL port is exposed (to a random port, printed out) so that web UI works
# - SSL port is exposed at https://localhost:10443 so that web UI works
# - 'WITH_RUBY_DBUS=1 $0' will prefer ../ruby-dbus to any ruby-dbus.gem

set -x
Expand Down Expand Up @@ -38,7 +38,7 @@ podman run --name ${CNAME?} \
--privileged --detach \
-v .:/checkout \
${MORE_VOLUMES[@]} \
-p :443 \
-p 10443:443 \
${CIMAGE?}

# shortcut for the following
Expand All @@ -49,11 +49,8 @@ ${CEXEC?} "cd /checkout && ./setup.sh"
echo "Set the Agama (root) password:"
podman exec -it ${CNAME?} passwd

PORT=$(podman port ${CNAME?} 443)
PORT=${PORT#*:}

set +x
echo "agama-web-server (container port 443) forwarded to https://localhost:$PORT/"
echo "agama-web-server forwarded to https://localhost:10443/"
echo "To attach again to the Agama container run:"
echo " podman exec --tty --interactive ${CNAME?} bash"
echo "To stop and remove the Agama container run:"
Expand Down

0 comments on commit 0fcc127

Please sign in to comment.